[systemd-devel] [PATCH 2/2] accelerometer: display short options too
Lennart Poettering
lennart at poettering.net
Mon Jan 5 04:58:48 PST 2015
On Wed, 31.12.14 01:14, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> On Tue, Dec 30, 2014 at 08:29:27PM +0100, Paul Menzel wrote:
> > Am Dienstag, den 30.12.2014, 18:58 +0100 schrieb Robert Milasan:
> > > ---
> > > src/udev/accelerometer/accelerometer.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Awesome! Thank you for splitting these up and submitting a v2!
> >
> > > diff --git a/src/udev/accelerometer/accelerometer.c
> > > b/src/udev/accelerometer/accelerometer.c index 23d6f78..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");
> >
> > 1. I still wonder if the description is aligned after this patch is
> > applied.
> > 2. A space after the comma, `-d, --debug` would be helpful in my
> > opinion.
>
> It's good enough. Other code in src/udev uses this style. If they
> are changed to be more like the rest of systemd, it can all be done
> in one fell swoop.
I now converted most (but not all) of udev's tool's help output to be
more like the rest of systemd's tools.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list