[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Console client plug-in options

From: Marco Gerards
Subject: Console client plug-in options
Date: 07 Aug 2003 23:48:41 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


The console client can load drivers. The driver are responsible for
parameter parsing. For every driver that support this a parser needs
to be written.

It is hard to write a nice parser. The currently used parsers are not
good enough for me. They don't support short and long arguments. Often
the required filenames are passed to the driver incorrectly. For

--font foo

Normally this would be something like:

-f foo

Already tried to use an argp parser, and that worked. Unfortunately
there were issues with the argp parser, argp isn't reentrant. (I guess
I was lucky when I used it).

Another way to parse options and to make it really clear to the user
which option is used for what driver is using suboptions. This is more
like "mount -o" works.

With the current console parsers someone will :

console -d vga --font foo.bdf --full-glyphs -d xkb --keymap en_US /dev/vcs

With suboptions this will be:

console -d vga font=foo.bdf,full-glyphs -d xkb keymap=en_US /dev/vcs

The syntax would be:
console {OPTIONS} {-d DRIVER [suboptions]} CONSOLE

I can easily implement it, one bad side effect is that is breaks
compatibly, but we can better do this soon that later if we will use

Anyone some ideas or suggestions?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]