From owner-freebsd-bugs Sun Apr 14 14:24:09 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA15734 for bugs-outgoing; Sun, 14 Apr 1996 14:24:09 -0700 (PDT) Received: from ki.net (root@ki.net [205.150.102.1]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id OAA15701 Sun, 14 Apr 1996 14:23:58 -0700 (PDT) Received: from localhost (scrappy@localhost) by ki.net (8.7.4/8.7.4) with SMTP id RAA23960; Sun, 14 Apr 1996 17:23:15 -0400 (EDT) Date: Sun, 14 Apr 1996 17:23:14 -0400 (EDT) From: "Marc G. Fournier" To: Lyndon Nerenberg VE7TCP cc: freebsd-gnats-submit@freebsd.org, gnats@freefall.freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/1139: uname.1 and uname.c disagree about display ordering In-Reply-To: <199604142039.NAA10243@multivac.orthanc.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sun, 14 Apr 1996, Lyndon Nerenberg VE7TCP wrote: > >>>>> "Marc" == Marc G Fournier writes: > > Marc> I may be missing the point here, but option ordering > Marc> doesn't seem to make any difference: > > Read the source and you'll see why. > I have, and option ordering doesn't make any difference in the source code...unless I'm missing something you are seeing? > Marc> -a Behave as though the options -m, -n, -r, -s, and -v > Marc> were speci- fied. > > Marc> It doesn't say in what order, just that it will behave > Marc> as if all were specified. > > True, but the implication (as I read it) is that things will come out > in the documented order. > first off, how do you get it implied that the ordering of the output is determined by the ordering of the options from the man page? I've just read the man page twice more, and find no implication to this effect... And, uname -a does behave as if options -m -n -r -s and -v are specifed: > uname -a FreeBSD ki.net 2.1-STABLE FreeBSD 2.1-STABLE #5: Tue Mar 26 14:40:09 EST 1996 scrappy@ki.net:/usr/src/sys/compile/kinet i386 > uname -m -n -r -s -v FreeBSD ki.net 2.1-STABLE FreeBSD 2.1-STABLE #5: Tue Mar 26 14:40:09 EST 1996 scrappy@ki.net:/usr/src/sys/compile/kinet i386 Exact same ordering of the output regardless of which format I use...therefore, the man page is accurate to the operation of the program, IMHO. > Your comments point out another bug - the output should match the option > ordering specified on the command line. > Why? All your options are doing are turning on various flags. About the only way I could see of cleanly (reasonably cleanly, at least) accomplishing this would be to get rid of each of the "if(flags &..)" constructs and place them inside of the getopt() while loop, so as each flag came up, its appropriate output would be printed. Not a bad idea, until you consider the instance where you try: uname -m -z (oops, I missed the a and hit z) As it is now, you will get an error and a usage message because of the z...having it output on a flag-by-flag basis would result in getting the output for -m and then the error/usage message, which kind of sounds messy to me. Marc G. Fournier scrappy@ki.net Systems Administrator @ ki.net scrappy@freebsd.org