[systemd-devel] Small fixes to accelerometer

Paul Menzel paulepanter at users.sourceforge.net
Tue Dec 30 07:37:29 PST 2014


Dear Robert,


thank you for your patch. You should tag patches with [PATCH] in the
subject. Your MUA (mail client) Claws Mail can probably even import the
mbox file `git format-patch -1` creates, which you attached.


Am Dienstag, den 30.12.2014, 09:23 +0100 schrieb Robert Milasan:
> From 7aaa2c1b6b6a6d0ef391610e932d6eff010dea41 Mon Sep 17 00:00:00 2001
> From: Robert Milasan <rmilasan at suse.com>
> Date: Tue, 30 Dec 2014 09:20:42 +0100
> Subject: [PATCH] accelerometer: drop unused -x option, display short options
>  too.

As you can see from the line break in the summary, it is too long, which
in this case stems from the fact, that you have one commit for two
issues. It’s good measure to send one patch for one problem.

Could you please submit two patches instead? `git add -p` helps here.
Please ask if you need help splitting the commit up.

> ---
>  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");

Should there be a space after the `,`? Do the descriptions still align
well.

>  }
>  
>  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);

Good find!

>                  if (option == -1)
>                          break;


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141230/44cba99e/attachment.sig>


More information about the systemd-devel mailing list