@@ -196,7 +196,7 @@ GETOPT=$(getopt \
196196 --longoptions=debug,help,quiet,syslog,verbose \
197197 --options=dnshl:k:p:rs:qgv \
198198 -- " $@ " ) \
199- || exit 1
199+ || exit 128
200200
201201eval set -- " $GETOPT "
202202
229229 if ! test " $2 " -gt ' 0' 2> /dev/null
230230 then
231231 print_log error " The $1 parameter must be a positive integer."
232- exit 2
232+ exit 129
233233 fi
234234 opt_keep=" $2 "
235235 shift 2
245245 case $opt_prefix in
246246 ([![:alnum:]_-.:\ ]* )
247247 print_log error " The $1 parameter must be alphanumeric."
248- exit 44
248+ exit 130
249249 ;;
250250 esac
251251 opt_prefix=" ${opt_prefix# ?} "
270270 ;;
271271 (' ' )
272272 print_log error " The $1 parameter must be non-empty."
273- exit 3
273+ exit 131
274274 ;;
275275 (* )
276276 print_log error " The $1 parameter must be one alphanumeric character."
277- exit 4
277+ exit 132
278278 ;;
279279 esac
280280 opt_sep=" $2 "
299299if [ " $# " -eq ' 0' ]
300300then
301301 print_log error " The filesystem argument list is empty."
302- exit 5
302+ exit 133
303303fi
304304
305305# Count the number of times '//' appears on the command line.
@@ -312,22 +312,22 @@ done
312312if [ " $# " -gt ' 1' -a " $SLASHIES " -gt ' 0' ]
313313then
314314 print_log error " The // must be the only argument if it is given."
315- exit 6
315+ exit 134
316316fi
317317
318318# These are the only times that `zpool status` or `zfs list` are invoked, so
319319# this program for Linux has a much better runtime complexity than the similar
320320# Solaris implementation.
321321
322322ZPOOL_STATUS=$( env LC_ALL=C zpool status 2>&1 ) \
323- || { print_log error " zpool status $? : $ZPOOL_STATUS " ; exit 7 ; }
323+ || { print_log error " zpool status $? : $ZPOOL_STATUS " ; exit 135 ; }
324324
325325ZFS_LIST=$( env LC_ALL=C zfs list -H -t filesystem,volume -s name \
326326 -o name,com.sun:auto-snapshot,com.sun:auto-snapshot:" $opt_label " ) \
327- || { print_log error " zfs list $? : $ZFS_LIST " ; exit 8 ; }
327+ || { print_log error " zfs list $? : $ZFS_LIST " ; exit 136 ; }
328328
329329SNAPSHOTS_OLD=$( env LC_ALL=C zfs list -H -t snapshot -S creation -o name) \
330- || { print_log error " zfs list $? : $SNAPSHOTS_OLD " ; exit 9 ; }
330+ || { print_log error " zfs list $? : $SNAPSHOTS_OLD " ; exit 137 ; }
331331
332332
333333# Verify that each argument is a filesystem or volume.
341341 $ZFS_LIST
342342 HERE
343343 print_log error " $ii is not a ZFS filesystem or volume."
344- exit 10
344+ exit 138
345345done
346346
347347# Get a list of pools that are being scrubbed.
0 commit comments