As in the subject, check attached patch.

Found 2 problems:

1. -x option not in use, so we should just drop it from the code
2. we support long and short options, but we advertise only long ones.


-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: [email protected]
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A
>From 7aaa2c1b6b6a6d0ef391610e932d6eff010dea41 Mon Sep 17 00:00:00 2001
From: Robert Milasan <[email protected]>
Date: Tue, 30 Dec 2014 09:20:42 +0100
Subject: [PATCH] accelerometer: drop unused -x option, display short options
 too.

---
 src/udev/accelerometer/accelerometer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c
index dd4b7dc..9c13d97 100644
--- a/src/udev/accelerometer/accelerometer.c
+++ b/src/udev/accelerometer/accelerometer.c
@@ -198,8 +198,8 @@ static void test_orientation(struct udev *udev,
 static void help(void)
 {
         printf("Usage: accelerometer [options] <device path>\n"
-               "  --debug         debug to stderr\n"
-               "  --help          print this help text\n\n");
+               "  -d,--debug         debug to stderr\n"
+               "  -h,--help          print this help text\n\n");
 }
 
 int main (int argc, char** argv)
@@ -229,7 +229,7 @@ int main (int argc, char** argv)
         while (1) {
                 int option;
 
-                option = getopt_long(argc, argv, "dxh", options, NULL);
+                option = getopt_long(argc, argv, "dh", options, NULL);
                 if (option == -1)
                         break;
 
-- 
1.8.4.5

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to