* [PATCH] udevd.c: Add 'N:' to optstring in getopt_long
@ 2011-03-31 13:06 Thomas Egerer
2011-03-31 14:30 ` Martin Pitt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Egerer @ 2011-03-31 13:06 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 138 bytes --]
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
---
udev/udevd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[-- Attachment #2: 0001-udevd.c-Add-N-to-optstring-in-getopt_long.patch --]
[-- Type: text/x-patch, Size: 359 bytes --]
diff --git a/udev/udevd.c b/udev/udevd.c
index 1871474..53db44a 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -1118,7 +1118,7 @@ int main(int argc, char *argv[])
for (;;) {
int option;
- option = getopt_long(argc, argv, "c:deDthV", options, NULL);
+ option = getopt_long(argc, argv, "c:deDthN:V", options, NULL);
if (option == -1)
break;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] udevd.c: Add 'N:' to optstring in getopt_long
2011-03-31 13:06 [PATCH] udevd.c: Add 'N:' to optstring in getopt_long Thomas Egerer
@ 2011-03-31 14:30 ` Martin Pitt
2011-03-31 15:21 ` Kay Sievers
2011-03-31 15:29 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Martin Pitt @ 2011-03-31 14:30 UTC (permalink / raw)
To: linux-hotplug
Hello Thomas,
Thomas Egerer [2011-03-31 15:06 +0200]:
> - option = getopt_long(argc, argv, "c:deDthV", options, NULL);
> + option = getopt_long(argc, argv, "c:deDthN:V", options, NULL);
This is certainly an inconsistency, but I wonder if we shouldn't
instead just remove the other short options from the optstring?
Neither --help nor the manpage document the short versions, so they
could be considered a kind of implementation detail?
I. e. we should perhaps only support the documented long options.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udevd.c: Add 'N:' to optstring in getopt_long
2011-03-31 13:06 [PATCH] udevd.c: Add 'N:' to optstring in getopt_long Thomas Egerer
2011-03-31 14:30 ` Martin Pitt
@ 2011-03-31 15:21 ` Kay Sievers
2011-03-31 15:29 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2011-03-31 15:21 UTC (permalink / raw)
To: linux-hotplug
On Thu, Mar 31, 2011 at 16:30, Martin Pitt <martin.pitt@ubuntu.com> wrote:
> Hello Thomas,
>
> Thomas Egerer [2011-03-31 15:06 +0200]:
>> - option = getopt_long(argc, argv, "c:deDthV", options, NULL);
>> + option = getopt_long(argc, argv, "c:deDthN:V", options, NULL);
>
> This is certainly an inconsistency, but I wonder if we shouldn't
> instead just remove the other short options from the optstring?
> Neither --help nor the manpage document the short versions, so they
> could be considered a kind of implementation detail?
>
> I. e. we should perhaps only support the documented long options.
There is no real need to have the long and short ones in sync.
Most of the short options are only used on the commandline during
development, and none of them are documented, or there are any real
guarantees about them to stay as they are.
Only the documented long options should be used for anything that is
not a human on the commandline.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udevd.c: Add 'N:' to optstring in getopt_long
2011-03-31 13:06 [PATCH] udevd.c: Add 'N:' to optstring in getopt_long Thomas Egerer
2011-03-31 14:30 ` Martin Pitt
2011-03-31 15:21 ` Kay Sievers
@ 2011-03-31 15:29 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2011-03-31 15:29 UTC (permalink / raw)
To: linux-hotplug
On Thu, Mar 31, 2011 at 15:06, Thomas Egerer <thomas.egerer@secunet.com> wrote:
> udev/udevd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Applied. But please use the long options is anything that can not cope
with possible changes. The short options are just there to please
humans, not scripts. :)
Thanks,
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-31 15:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31 13:06 [PATCH] udevd.c: Add 'N:' to optstring in getopt_long Thomas Egerer
2011-03-31 14:30 ` Martin Pitt
2011-03-31 15:21 ` Kay Sievers
2011-03-31 15:29 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).