Module Name:    src
Committed By:   mbalmer
Date:           Sun Oct  2 12:43:53 UTC 2011

Modified Files:
        src/share/man/man4: gpioiic.4
        src/usr.sbin/gpioctl: gpioctl.8 gpioctl.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/gpioiic.4
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/gpioctl/gpioctl.8
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/gpioctl/gpioctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/gpioiic.4
diff -u src/share/man/man4/gpioiic.4:1.3 src/share/man/man4/gpioiic.4:1.4
--- src/share/man/man4/gpioiic.4:1.3	Sun Oct  2 09:33:18 2011
+++ src/share/man/man4/gpioiic.4	Sun Oct  2 12:43:52 2011
@@ -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 <gra...@openbsd.org>
@@ -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 @@ The
 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.

Index: src/usr.sbin/gpioctl/gpioctl.8
diff -u src/usr.sbin/gpioctl/gpioctl.8:1.11 src/usr.sbin/gpioctl/gpioctl.8:1.12
--- src/usr.sbin/gpioctl/gpioctl.8:1.11	Sun Oct  2 09:33:19 2011
+++ src/usr.sbin/gpioctl/gpioctl.8	Sun Oct  2 12:43:53 2011
@@ -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 <m...@msys.ch>
 .\" Copyright (c) 2004 Alexander Yurchenko <gra...@openbsd.org>
@@ -29,7 +29,7 @@
 .Ar device
 .Ar offset
 .Ar mask
-.Op Ar flags
+.Op Ar flag
 .Nm gpioctl
 .Op Fl q
 .Ar device

Index: src/usr.sbin/gpioctl/gpioctl.c
diff -u src/usr.sbin/gpioctl/gpioctl.c:1.14 src/usr.sbin/gpioctl/gpioctl.c:1.15
--- src/usr.sbin/gpioctl/gpioctl.c:1.14	Sun Oct  2 09:33:19 2011
+++ src/usr.sbin/gpioctl/gpioctl.c	Sun Oct  2 12:43:53 2011
@@ -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 <mbal...@netbsd.org>
@@ -143,11 +143,12 @@ main(int argc, char *argv[])
 			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 @@ usage(void)
 	    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);
 

Reply via email to