From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Meyering Date: Thu, 08 May 2003 16:17:48 +0000 Subject: Re: [Cooker] strange problem with "hotplug" package Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Thanks! Stepan Kasal wrote: > @@ -1579,7 +1578,7 @@ main (int argc, char **argv) > !strcasecmp(optarg, "if-tty")) > color_option = 2; > else > - show_help = 1; > + error (2, 0, _("unrecognized colour option")); A minor nit: it is customary to include the offending string in such a diagnostic. It's also nice to allow the user to specify a prefix of the option argument: grep --color=al To that end, you might want to use XARGMATCH as in e.g., coreutils' ls.c. It does this for --time={atime, access, use, ctime, status} case TIME_OPTION: time_type = XARGMATCH ("--time", optarg, time_args, time_types); break; With that and the corresponding declarations, ls gives diagnostics like this: $ ls --time=z ls: invalid argument `z' for `--time' Valid arguments are: - `atime', `access', `use' - `ctime', `status' Try `ls --help' for more information. You'd need lib/argmatch.[ch]. ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel