Reset OPTIND to 1 in f_device_find()

This commit is contained in:
Devin Teske 2016-01-31 21:14:31 +00:00
parent 94d8b152b9
commit 57ef9b750b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295100

View File

@ -1,6 +1,6 @@
if [ ! "$_DEVICE_SUBR" ]; then _DEVICE_SUBR=1
#
# Copyright (c) 2012-2014 Devin Teske
# Copyright (c) 2012-2016 Devin Teske
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -1032,7 +1032,7 @@ f_device_is_active()
#
f_device_find()
{
local OPTIND OPTARG flag only_one=
local OPTIND=1 OPTARG flag only_one=
while getopts 1 flag; do
case "$flag" in
1) only_one=1 ;;