On Tue, Mar 24, 2020 at 11:19:27AM +1100, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > When getopt() is passed an option string like "-m -n" and the > parameter m is defined as "m:", getopt returns a special error > to indication that the optstring started with a "-". Any getopt() > caller that is just catching the "?" error character will not > not catch this special error, so it silently eats the parameter > following -m. > > Lots of getopt loops in xfsprogs have this issue. Convert them all > to just use a "default:" to catch anything unexpected. > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Looks good, Reviewed-by: Christoph Hellwig <hch@xxxxxx>