diff options
author | msmith <msmith@FreeBSD.org> | 1999-01-11 06:41:32 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-01-11 06:41:32 +0000 |
commit | d141889dddbf47c0830a1864cd283ada0754c6e8 (patch) | |
tree | 80abade00f02b7ec6de90f25817c052679c93375 /sys/boot/common/module.c | |
parent | 192ad366a1277ebc36c037b0a2b9b7bb1ea780c0 (diff) | |
download | FreeBSD-src-d141889dddbf47c0830a1864cd283ada0754c6e8.zip FreeBSD-src-d141889dddbf47c0830a1864cd283ada0754c6e8.tar.gz |
No builtin command resets getopt before using it, causing
problems in case a wrong option was given previously, and no option
is given to the next command.
PR: kern/9371
Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
Diffstat (limited to 'sys/boot/common/module.c')
-rw-r--r-- | sys/boot/common/module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c index 5b0d547..141a8ed 100644 --- a/sys/boot/common/module.c +++ b/sys/boot/common/module.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: module.c,v 1.5 1998/09/26 10:51:38 dfr Exp $ + * $Id: module.c,v 1.6 1998/10/09 23:12:34 peter Exp $ */ /* @@ -72,6 +72,7 @@ command_load(int argc, char *argv[]) dofile = 0; optind = 1; + optreset = 1; typestr = NULL; while ((ch = getopt(argc, argv, "t:")) != -1) { switch(ch) { @@ -133,6 +134,7 @@ command_lsmod(int argc, char *argv[]) verbose = 0; optind = 1; + optreset = 1; while ((ch = getopt(argc, argv, "v")) != -1) { switch(ch) { case 'v': |