Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src It's actually 'the flag locator', not 'flags' (as 'flags' ca...



details:   https://anonhg.NetBSD.org/src/rev/b967cd8dc39a
branches:  trunk
changeset: 770054:b967cd8dc39a
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sun Oct 02 12:43:52 2011 +0000

description:
It's actually 'the flag locator', not 'flags' (as 'flags' can not be used
as a locator name for reasons unknown to me.)

diffstat:

 share/man/man4/gpioiic.4   |  6 +++---
 usr.sbin/gpioctl/gpioctl.8 |  4 ++--
 usr.sbin/gpioctl/gpioctl.c |  9 +++++----
 3 files changed, 10 insertions(+), 9 deletions(-)

diffs (78 lines):

diff -r 25d32aa16505 -r b967cd8dc39a share/man/man4/gpioiic.4
--- a/share/man/man4/gpioiic.4  Sun Oct 02 12:25:40 2011 +0000
+++ b/share/man/man4/gpioiic.4  Sun Oct 02 12:43:52 2011 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: gpioiic.4,v 1.3 2011/10/02 09:33:18 mbalmer Exp $
+.\"    $NetBSD: gpioiic.4,v 1.4 2011/10/02 12:43:52 mbalmer Exp $
 .\"    $OpenBSD: gpioiic.4,v 1.6 2008/11/24 15:30:21 jmc Exp $
 .\"
 .\" Copyright (c) 2006 Alexander Yurchenko <grange%openbsd.org@localhost>
@@ -22,7 +22,7 @@
 .Nm gpioiic
 .Nd GPIO I2C controller
 .Sh SYNOPSIS
-.Cd "gpioiic* at gpio? offset 0 mask 0x3 flags 0x0"
+.Cd "gpioiic* at gpio? offset 0 mask 0x3 flag 0x0"
 .Cd "gpioiic* at gpio?"
 .Cd "iic* at gpioiic?"
 .Sh DESCRIPTION
@@ -31,7 +31,7 @@
 driver allows bit-banging an I2C bus as a master using two GPIO pins.
 By default the first pin is used as a serial data (SDA) signal and the
 second as a serial clock (SCL).
-If the flags locator is set to 0x01, the order of the SDA and SCL signals
+If the flag locator is set to 0x01, the order of the SDA and SCL signals
 is reversed.
 Both GPIO pins must be able to drive an output and the SDA pin must be
 also able to read an input.
diff -r 25d32aa16505 -r b967cd8dc39a usr.sbin/gpioctl/gpioctl.8
--- a/usr.sbin/gpioctl/gpioctl.8        Sun Oct 02 12:25:40 2011 +0000
+++ b/usr.sbin/gpioctl/gpioctl.8        Sun Oct 02 12:43:52 2011 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpioctl.8,v 1.11 2011/10/02 09:33:19 mbalmer Exp $
+.\" $NetBSD: gpioctl.8,v 1.12 2011/10/02 12:43:53 mbalmer Exp $
 .\"
 .\" Copyright (c) 2009, 2010, 2011 Marc Balmer <marc%msys.ch@localhost>
 .\" Copyright (c) 2004 Alexander Yurchenko <grange%openbsd.org@localhost>
@@ -29,7 +29,7 @@
 .Ar device
 .Ar offset
 .Ar mask
-.Op Ar flags
+.Op Ar flag
 .Nm gpioctl
 .Op Fl q
 .Ar device
diff -r 25d32aa16505 -r b967cd8dc39a usr.sbin/gpioctl/gpioctl.c
--- a/usr.sbin/gpioctl/gpioctl.c        Sun Oct 02 12:25:40 2011 +0000
+++ b/usr.sbin/gpioctl/gpioctl.c        Sun Oct 02 12:43:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioctl.c,v 1.14 2011/10/02 09:33:19 mbalmer Exp $ */
+/* $NetBSD: gpioctl.c,v 1.15 2011/10/02 12:43:53 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2008, 2010, 2011 Marc Balmer <mbalmer%NetBSD.org@localhost>
@@ -143,11 +143,12 @@
                        lval = strtol(flags, &ep, 0);
                        if (*flags == '\0' || *ep != '\0')
                                errx(EXIT_FAILURE,
-                                   "invalid flags (not a number)");
+                                   "invalid flag locator (not a number)");
                        if ((errno == ERANGE && (lval == LONG_MAX
                            || lval == LONG_MIN))
                            || (unsigned long)lval > UINT_MAX)
-                               errx(EXIT_FAILURE, "flags out of range");
+                               errx(EXIT_FAILURE, "flag locator out of range");
+
                        ga_flags = lval;
                }
                devattach(driver, ga_offset, ga_mask, ga_flags);
@@ -437,7 +438,7 @@
            progname);
        fprintf(stderr, "       %s [-q] device pin unset\n", progname);
        fprintf(stderr, "       %s [-q] device attach device offset mask "
-           "[flags]\n",
+           "[flag]\n",
            progname);
        fprintf(stderr, "       %s [-q] device detach device\n", progname);
 



Home | Main Index | Thread Index | Old Index