[syslinux] correct "--help' options
Jeffrey Hutzelman
jhutz at cmu.edu
Tue Sep 4 07:48:36 PDT 2012
On Sun, 2012-09-02 at 08:55 +0200, Ady Ady wrote:
> > Using "-o" again in linux/syslinux or mtools/syslinux would be
> > extremely bad. It should probably either be maintained as-is or
> > removed entirely. Reusing it for a completely different purpose would
> > cause a user to see unexpected behavior. hpa would be the final
> > authority (of course).
> >
>
> I fail to see the difference of such decisions in terms of the impact on
> users. If changing from "-o" to "-t" was acceptable (which is also
> arguable), then now using "-o" to something else has the same type of
> impact on users (specially since there are several versions, and time, in
> between).
No, it doesn't. If the short option for --offset is now -t instead of
-o, then when syslinux is invoked with -o, it will print an error
message and exit without doing anything. However, if -o is then reused
to mean --once, then when syslinux is invoked with -o 12345, then it
will both do the wrong thing _and_ use the wrong offset. At best, it
prints an error and does nothing, but worse cases are easily possible,
such as modifying the wrong filesystem.
> Let's assume, just for the sake of the argument, that "-o" would be used now
> for "--once" in syslinux (as it is used in other installers). A user trying
> to use "-o" as "--offset" (as in older versions) will fail. The only case
> where it may "erroneously" succeed would be such that the value for the
> offset would be the same as a value accepted by "--once".
That would be all cases, since --once accepts any value.
> The possibility of not using "-o" at all also presents the same issue.
> Someone that is used to use "-o" with the current meaning of "--once" in
> installers other than syslinux, would find that it is failing (after "-o" is
> taken out as equivalent for "--once").
I think one of the things you're missing here is that it's not
reasonable to assume a user will see an error message and simply try
again with the right option. A fairly large fraction of all uses of
Syslinux installers are by other programs, which cannot be assumed to
change just exactly at the moment that Syslinux changes its installers'
command-line interfaces. Usability is important, but so is interface
stability, especially for programs that are invoked mostly
programmatically.
-- Jeffrey T. Hutzelman (N3NHS) <jhutz+ at cmu.edu>
Carnegie Mellon University - Pittsburgh, PA
More information about the Syslinux
mailing list