diff options
author | wollman <wollman@FreeBSD.org> | 2001-02-21 19:31:53 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2001-02-21 19:31:53 +0000 |
commit | 11947dbc7d661668935fadba4b8535c0aaf46172 (patch) | |
tree | 5bdad201a334c9f3be0c87ad60265f2de32687fb /usr.bin/getconf | |
parent | bb9ee8e09f8c8bca307cf1ea68aef76f3a7ab1ed (diff) | |
download | FreeBSD-src-11947dbc7d661668935fadba4b8535c0aaf46172.zip FreeBSD-src-11947dbc7d661668935fadba4b8535c0aaf46172.tar.gz |
Destroy the evidence of my misunderstanding of the specification.
Also fix up the phrasing in the man page a bit.
Diffstat (limited to 'usr.bin/getconf')
-rw-r--r-- | usr.bin/getconf/getconf.1 | 19 | ||||
-rw-r--r-- | usr.bin/getconf/getconf.c | 12 |
2 files changed, 2 insertions, 29 deletions
diff --git a/usr.bin/getconf/getconf.1 b/usr.bin/getconf/getconf.1 index 1e3d2e5..e370d40 100644 --- a/usr.bin/getconf/getconf.1 +++ b/usr.bin/getconf/getconf.1 @@ -46,11 +46,11 @@ .Sh DESCRIPTION The .Nm -utility outputs the value of +utility prints the value of a .Tn POSIX or .Tn X/Open -system or path configuration variable on the standard output. +system or path configuration variable to the standard output. If the specified variable is undefined, the string .Dq Li undefined is output. @@ -142,20 +142,5 @@ The .Nm command first appeared in .Fx 5.0 . -.Sh BUGS -The original -.Tn X/Open -specification erroneously requires the return values of -.Xr pathconf 2 -and -.Xr sysconf 3 -to be printed using the -.Xr printf 3 -format specifier -.Li \&"%d" . -We ignore that aspect of the specification and use the -correct -.Li \&"%ld" -format. .Sh AUTHORS .An Garrett A. Wollman Aq wollman@lcs.mit.edu diff --git a/usr.bin/getconf/getconf.c b/usr.bin/getconf/getconf.c index b33f574..87b91b1 100644 --- a/usr.bin/getconf/getconf.c +++ b/usr.bin/getconf/getconf.c @@ -136,12 +136,6 @@ do_sysconf(const char *name, int key) else if (value == -1) printf("undefined\n"); else - /* - * SUSv2 specifies that the value, if defined, is to be - * printed using the format "%d\n". This is clearly - * erroneous, since sysconf is defined to return a long - * and not an int. - */ printf("%ld\n", value); } @@ -157,11 +151,5 @@ do_pathconf(const char *name, int key, const char *path) else if (value == -1) printf("undefined\n"); else - /* - * SUSv2 specifies that the value, if defined, is to be - * printed using the format "%d\n". This is clearly - * erroneous, since sysconf is defined to return a long - * and not an int. - */ printf("%ld\n", value); } |