Re: [systemd-devel] [PATCH] improve help/usage for some more programs

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 31, 2014 at 01:18:55PM +0100, Robert Milasan wrote:
 ---
  src/udev/ata_id/ata_id.c |  4 ++--
  src/udev/cdrom_id/cdrom_id.c | 10 +-
  src/udev/collect/collect.c   | 10 ++
  src/udev/scsi_id/scsi_id.c   |  2 +-
  src/udev/v4l_id/v4l_id.c |  2 +-
  5 files changed, 15 insertions(+), 13 deletions(-)
 
 diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
 index e6344f9..31bc167 100644
 --- a/src/udev/ata_id/ata_id.c
 +++ b/src/udev/ata_id/ata_id.c
 @@ -450,8 +450,8 @@ int main(int argc, char *argv[])
  break;
  case 'h':
  printf(Usage: ata_id [--export] [--help]
 device\n
 - --exportprint values as
 environment keys\n
 - --help  print this help
 text\n\n);
 + -x,--exportprint values as
 environment keys\n
 + -h,--help  print this help
 text\n\n); return 0;
Patch is wrapped. Please resend, (git send-email preferably,
as an attachment otherwise).

Zbyszek

  }
  }
 diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
 index 8a41c4f..6052f6a 100644
 --- a/src/udev/cdrom_id/cdrom_id.c
 +++ b/src/udev/cdrom_id/cdrom_id.c
 @@ -891,11 +891,11 @@ int main(int argc, char *argv[])
  break;
  case 'h':
  printf(Usage: cdrom_id [options] device\n
 - --lock-medialock the media (to
 enable eject request events)\n
 - --unlock-media  unlock the media\n
 - --eject-media   eject the media\n
 - --debug debug to stderr\n
 - --help  print this help
 text\n\n);
 + -l,--lock-medialock the media
 (to enable eject request events)\n
 + -u,--unlock-media  unlock the
 media\n
 + -e,--eject-media   eject the media\n
 + -d,--debug debug to stderr\n
 + -h,--help  print this help
 text\n\n); goto exit;
  default:
  rc = 1;
 diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
 index 16675fb..11a618c 100644
 --- a/src/udev/collect/collect.c
 +++ b/src/udev/collect/collect.c
 @@ -68,15 +68,17 @@ noreturn static void sig_alrm(int signo)
  
  static void usage(void)
  {
 -printf(usage: collect [--add|--remove] [--debug] checkpoint
 id idlist\n
 -   \n
 +printf(Usage: collect [options] checkpoint id idlist\n
 + -a,--add add ID id to the list idlist\n
 + -r,--remove  remove ID id from the list
 idlist\n
 + -d,--debug   debug to stderr\n
 + -h,--helpprint this help text\n\n
   Adds ID id to the list governed by checkpoint.\n
   id must be part of the list idlist.\n
   If all IDs given by idlist are listed (ie collect
 has been\n   invoked for each ID in idlist) collect returns 0,
 the\n   number of missing IDs otherwise.\n
 - On error a negative number is returned.\n
 -   \n);
 + On error a negative number is returned.\n\n);
  }
  
  /*
 diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
 index 27adb09..5270233 100644
 --- a/src/udev/scsi_id/scsi_id.c
 +++ b/src/udev/scsi_id/scsi_id.c
 @@ -313,7 +313,7 @@ static void help(void) {
   -g,--whitelisted treat device as
 whitelisted\n   -u,--replace-whitespace  replace all
 whitespace by underscores\n   -v,--verbose
 verbose logging\n
 ---version print version\n
 + -V,--version print version\n
   -x,--export  print values as
 environment keys\n   -h,--helpprint this help
 text\n\n); 
 diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c
 index d5463b2..08d3efa 100644
 --- a/src/udev/v4l_id/v4l_id.c
 +++ b/src/udev/v4l_id/v4l_id.c
 @@ -45,7 +45,7 @@ int main (int argc, char *argv[])
  
  switch (option) {
  case 'h':
 -printf(Usage: v4l_id [--help] device
 file\n\n);
 +printf(Usage: v4l_id [-h,--help] device
 file\n\n); return 0;
  default:
  return 1;
 -- 
 1.8.4.5
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list

Re: [systemd-devel] [PATCH] improve help/usage for some more programs

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 06:11:22PM +0100, Robert Milasan wrote:
 From 9cd266590dbf1d22b1a7fc184ecc8c3868f280f9 Mon Sep 17 00:00:00 2001
 From: Robert Milasan rmila...@suse.com
 Date: Wed, 31 Dec 2014 13:17:23 +0100
 Subject: [PATCH] improve help/usage for some more programs
Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] improve help/usage for some more programs

2015-01-01 Thread Robert Milasan
On Thu, 1 Jan 2015 18:07:59 +0100
Zbigniew J*drzejewski-Szmek zbys...@in.waw.pl wrote:

 Patch is wrapped. Please resend, (git send-email preferably,
 as an attachment otherwise).
 
 Zbyszek
 

-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmila...@suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A
From 9cd266590dbf1d22b1a7fc184ecc8c3868f280f9 Mon Sep 17 00:00:00 2001
From: Robert Milasan rmila...@suse.com
Date: Wed, 31 Dec 2014 13:17:23 +0100
Subject: [PATCH] improve help/usage for some more programs

---
 src/udev/ata_id/ata_id.c |  4 ++--
 src/udev/cdrom_id/cdrom_id.c | 10 +-
 src/udev/collect/collect.c   | 10 ++
 src/udev/scsi_id/scsi_id.c   |  2 +-
 src/udev/v4l_id/v4l_id.c |  2 +-
 5 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
index e6344f9..31bc167 100644
--- a/src/udev/ata_id/ata_id.c
+++ b/src/udev/ata_id/ata_id.c
@@ -450,8 +450,8 @@ int main(int argc, char *argv[])
 break;
 case 'h':
 printf(Usage: ata_id [--export] [--help] device\n
- --exportprint values as environment keys\n
- --help  print this help text\n\n);
+ -x,--exportprint values as environment keys\n
+ -h,--help  print this help text\n\n);
 return 0;
 }
 }
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 8a41c4f..6052f6a 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -891,11 +891,11 @@ int main(int argc, char *argv[])
 break;
 case 'h':
 printf(Usage: cdrom_id [options] device\n
- --lock-medialock the media (to enable eject request events)\n
- --unlock-media  unlock the media\n
- --eject-media   eject the media\n
- --debug debug to stderr\n
- --help  print this help text\n\n);
+ -l,--lock-medialock the media (to enable eject request events)\n
+ -u,--unlock-media  unlock the media\n
+ -e,--eject-media   eject the media\n
+ -d,--debug debug to stderr\n
+ -h,--help  print this help text\n\n);
 goto exit;
 default:
 rc = 1;
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 16675fb..11a618c 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -68,15 +68,17 @@ noreturn static void sig_alrm(int signo)
 
 static void usage(void)
 {
-printf(usage: collect [--add|--remove] [--debug] checkpoint id idlist\n
-   \n
+printf(Usage: collect [options] checkpoint id idlist\n
+ -a,--add add ID id to the list idlist\n
+ -r,--remove  remove ID id from the list idlist\n
+ -d,--debug   debug to stderr\n
+ -h,--helpprint this help text\n\n
  Adds ID id to the list governed by checkpoint.\n
  id must be part of the list idlist.\n
  If all IDs given by idlist are listed (ie collect has been\n
  invoked for each ID in idlist) collect returns 0, the\n
  number of missing IDs otherwise.\n
- On error a negative number is returned.\n
-   \n);
+ On error a negative number is returned.\n\n);
 }
 
 /*
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
index 27adb09..5270233 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/udev/scsi_id/scsi_id.c
@@ -313,7 +313,7 @@ static void help(void) {
  -g,--whitelisted treat device as whitelisted\n
  -u,--replace-whitespace  replace all whitespace by underscores\n
  -v,--verbose verbose logging\n
---version print version\n
+ -V,--version print version\n
  -x,--export  print values as environment keys\n
  -h,--helpprint this help text\n\n);
 
diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c
index d5463b2..08d3efa 100644
--- a/src/udev/v4l_id/v4l_id.c
+++ b/src/udev/v4l_id/v4l_id.c
@@ -45,7 +45,7 @@ int main (int argc, char *argv[])
 
 switch (option) {
 case 'h':
-

[systemd-devel] [PATCH] improve help/usage for some more programs

2014-12-31 Thread Robert Milasan
---
 src/udev/ata_id/ata_id.c |  4 ++--
 src/udev/cdrom_id/cdrom_id.c | 10 +-
 src/udev/collect/collect.c   | 10 ++
 src/udev/scsi_id/scsi_id.c   |  2 +-
 src/udev/v4l_id/v4l_id.c |  2 +-
 5 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
index e6344f9..31bc167 100644
--- a/src/udev/ata_id/ata_id.c
+++ b/src/udev/ata_id/ata_id.c
@@ -450,8 +450,8 @@ int main(int argc, char *argv[])
 break;
 case 'h':
 printf(Usage: ata_id [--export] [--help]
device\n
- --exportprint values as
environment keys\n
- --help  print this help
text\n\n);
+ -x,--exportprint values as
environment keys\n
+ -h,--help  print this help
text\n\n); return 0;
 }
 }
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 8a41c4f..6052f6a 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -891,11 +891,11 @@ int main(int argc, char *argv[])
 break;
 case 'h':
 printf(Usage: cdrom_id [options] device\n
- --lock-medialock the media (to
enable eject request events)\n
- --unlock-media  unlock the media\n
- --eject-media   eject the media\n
- --debug debug to stderr\n
- --help  print this help
text\n\n);
+ -l,--lock-medialock the media
(to enable eject request events)\n
+ -u,--unlock-media  unlock the
media\n
+ -e,--eject-media   eject the media\n
+ -d,--debug debug to stderr\n
+ -h,--help  print this help
text\n\n); goto exit;
 default:
 rc = 1;
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 16675fb..11a618c 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -68,15 +68,17 @@ noreturn static void sig_alrm(int signo)
 
 static void usage(void)
 {
-printf(usage: collect [--add|--remove] [--debug] checkpoint
id idlist\n
-   \n
+printf(Usage: collect [options] checkpoint id idlist\n
+ -a,--add add ID id to the list idlist\n
+ -r,--remove  remove ID id from the list
idlist\n
+ -d,--debug   debug to stderr\n
+ -h,--helpprint this help text\n\n
  Adds ID id to the list governed by checkpoint.\n
  id must be part of the list idlist.\n
  If all IDs given by idlist are listed (ie collect
has been\n   invoked for each ID in idlist) collect returns 0,
the\n   number of missing IDs otherwise.\n
- On error a negative number is returned.\n
-   \n);
+ On error a negative number is returned.\n\n);
 }
 
 /*
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
index 27adb09..5270233 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/udev/scsi_id/scsi_id.c
@@ -313,7 +313,7 @@ static void help(void) {
  -g,--whitelisted treat device as
whitelisted\n   -u,--replace-whitespace  replace all
whitespace by underscores\n   -v,--verbose
verbose logging\n
---version print version\n
+ -V,--version print version\n
  -x,--export  print values as
environment keys\n   -h,--helpprint this help
text\n\n); 
diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c
index d5463b2..08d3efa 100644
--- a/src/udev/v4l_id/v4l_id.c
+++ b/src/udev/v4l_id/v4l_id.c
@@ -45,7 +45,7 @@ int main (int argc, char *argv[])
 
 switch (option) {
 case 'h':
-printf(Usage: v4l_id [--help] device
file\n\n);
+printf(Usage: v4l_id [-h,--help] device
file\n\n); return 0;
 default:
 return 1;
-- 
1.8.4.5
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel