diff options
author | delphij <delphij@FreeBSD.org> | 2010-12-14 01:16:56 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2010-12-14 01:16:56 +0000 |
commit | dc620e69a5f031d9bbf327f3f7afaff2e3ade62f (patch) | |
tree | 736339ec88fccc87803f5fdf1eb66a9f68ab31fa /lib/libbsm | |
parent | 5715a480cf14c5797c5c5b6c51bf9cef15b1460d (diff) | |
download | FreeBSD-src-dc620e69a5f031d9bbf327f3f7afaff2e3ade62f.zip FreeBSD-src-dc620e69a5f031d9bbf327f3f7afaff2e3ade62f.tar.gz |
IEEE Std 1003.1-2008, Section 1.4, Utility Description Defaults says
that when the options section is listed as "None", utility shall
recognize "--" as a first argument to be discarded.
This implementation is largely based on OpenBSD implementation but
we do slightly differently:
a) We skip argv[0] as the first step;
b) We test whether the next argument is "--" and ignore it.
With this change one will get:
%printf
usage: printf format [arguments ...]
%printf -v
-v%printf -- -v
-v%
%printf --
usage: printf format [arguments ...]
Which matches the behavior observed on a Debian system but different
from the Illumos change.
Diffstat (limited to 'lib/libbsm')
0 files changed, 0 insertions, 0 deletions