From 7c4460149dcf39ce45a63a428447da0574a29ddf Mon Sep 17 00:00:00 2001 From: dteske Date: Tue, 14 May 2013 03:21:13 +0000 Subject: Centralize standard getopts arguments, both for convenience and to correct a bug in which certain combinations of arguments produced unexpected results such as `-dX' (now properly produces debugging and X11), `-XS' (now properly produces X11 in secure mode), `-df-' (enables debugging when reading a script from standard-input, etc. Multi-word variations such as `-d -X', `-X -S', `-d -f-', `-d -f -', etc. also work as expected. Also tested were variations in argument order, which are now working as expected. --- usr.sbin/bsdconfig/diskmgmt/diskmgmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/bsdconfig/diskmgmt') diff --git a/usr.sbin/bsdconfig/diskmgmt/diskmgmt b/usr.sbin/bsdconfig/diskmgmt/diskmgmt index b8b97dc..26d39be 100755 --- a/usr.sbin/bsdconfig/diskmgmt/diskmgmt +++ b/usr.sbin/bsdconfig/diskmgmt/diskmgmt @@ -56,7 +56,7 @@ X11TERM_OPTS= # # Process command-line arguments # -while getopts dD:hSX flag; do +while getopts h$GETOPTS_STDARGS flag; do case "$flag" in h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; esac -- cgit v1.1