Skip to content

Commit c8507a0

Browse files
committed
Change objects to datasets in help and comments.
In the usage synopsis and program comments, change "objects" to "datasets" for consistency with upstream ZFS terminology.
1 parent 74359e5 commit c8507a0

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/zfs-auto-snapshot.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SNAPSHOTS_OLD=''
5151
print_usage ()
5252
{
5353
echo "Usage: $0 [options] [-l label] <'//' | name [name...]>
54-
--default-exclude Exclude objects if com.sun:auto-snapshot is unset.
54+
--default-exclude Exclude datasets if com.sun:auto-snapshot is unset.
5555
-d, --debug Print debugging messages.
5656
-e, --event=EVENT Set the com.sun:auto-snapshot-desc property to EVENT.
5757
-n, --dry-run Print actions without actually doing anything.
@@ -67,7 +67,7 @@ print_usage ()
6767
-g, --syslog Write messages into the system log.
6868
-r, --recursive Snapshot named filesystem and all descendants.
6969
-v, --verbose Print info messages.
70-
name Filesystem and volume names, or '//' for all ZFS objects.
70+
name Filesystem and volume names, or '//' for all ZFS datasets.
7171
"
7272
}
7373

@@ -369,15 +369,15 @@ ZPOOLS_NOTREADY=$(echo "$ZFS_STATUS" | awk -F ': ' \
369369
$1 ~ /^ *state$/ && $2 !~ /ONLINE|DEGRADED/ { print pool } ' \
370370
| sort)
371371

372-
# Get a list of objects for which snapshots are explicitly disabled.
372+
# Get a list of datasets for which snapshots are explicitly disabled.
373373
NOAUTO=$(echo "$ZFS_LIST" | awk -F '\t' \
374374
'tolower($2) ~ /false/ || tolower($3) ~ /false/ {print $1}')
375375

376-
# If the --default-exclude flag is set, then exclude all objects that lack
376+
# If the --default-exclude flag is set, then exclude all datasets that lack
377377
# an explicit com.sun:auto-snapshot* property. Otherwise, include them.
378378
if [ -n "$opt_default_exclude" ]
379379
then
380-
# Get a list of objects for which snapshots are explicitly enabled.
380+
# Get a list of datasets for which snapshots are explicitly enabled.
381381
CANDIDATES=$(echo "$ZFS_LIST" | awk -F '\t' \
382382
'tolower($2) ~ /true/ || tolower($3) ~ /true/ {print $1}')
383383
else
@@ -386,20 +386,20 @@ else
386386
'tolower($2) !~ /false/ && tolower($3) !~ /false/ {print $1}')
387387
fi
388388

389-
# Initialize the list of objects that will get a recursive snapshot.
389+
# Initialize the list of datasets that will get a recursive snapshot.
390390
TARGETS_RECURSIVE=''
391391

392-
# Initialize the list of objects that will get a non-recursive snapshot.
392+
# Initialize the list of datasets that will get a non-recursive snapshot.
393393
TARGETS_REGULAR=''
394394

395395
for ii in $CANDIDATES
396396
do
397-
# Qualify object names so variable globbing works properly.
397+
# Qualify dataset names so variable globbing works properly.
398398
# Suppose ii=tanker/foo and jj=tank sometime during the loop.
399399
# Just testing "$ii" != ${ii#$jj} would incorrectly match.
400400
iii="$ii/"
401401

402-
# Exclude objects that are not named on the command line.
402+
# Exclude datasets that are not named on the command line.
403403
IN_ARGS='0'
404404
for jj in "$@"
405405
do
@@ -413,27 +413,27 @@ do
413413
continue
414414
fi
415415

416-
# Exclude objects in pools that cannot do a snapshot.
416+
# Exclude datasets in pools that cannot do a snapshot.
417417
for jj in $ZPOOLS_NOTREADY
418418
do
419419
# Ibid regarding iii.
420420
jjj="$jj/"
421421

422-
# Check whether the pool name is a prefix of the object name.
422+
# Check whether the pool name is a prefix of the dataset name.
423423
if [ "$iii" != "${iii#$jjj}" ]
424424
then
425425
print_log info "Excluding $ii because pool $jj is not ready."
426426
continue 2
427427
fi
428428
done
429429

430-
# Exclude objects in scrubbing pools if the --skip-scrub flag is set.
430+
# Exclude datasets in scrubbing pools if the --skip-scrub flag is set.
431431
test -n "$opt_skip_scrub" && for jj in $ZPOOLS_SCRUBBING
432432
do
433433
# Ibid regarding iii.
434434
jjj="$jj/"
435435

436-
# Check whether the pool name is a prefix of the object name.
436+
# Check whether the pool name is a prefix of the dataset name.
437437
if [ "$iii" != "${iii#$jjj}" ]
438438
then
439439
print_log info "Excluding $ii because pool $jj is scrubbing."
@@ -449,14 +449,14 @@ do
449449
# The --recusive switch only matters for non-wild arguments.
450450
if [ -z "$opt_recursive" -a "$1" != '//' ]
451451
then
452-
# Snapshot this object non-recursively.
452+
# Snapshot this dataset non-recursively.
453453
print_log debug "Including $ii for regular snapshot."
454454
TARGETS_REGULAR="${TARGETS_REGULAR:+$TARGETS_REGULAR }$ii" # nb: \t
455455
continue 2
456-
# Check whether the candidate name is a prefix of any excluded object name.
456+
# Check whether the candidate name is a prefix of any excluded dataset name.
457457
elif [ "$jjj" != "${jjj#$iii}" ]
458458
then
459-
# Snapshot this object non-recursively.
459+
# Snapshot this dataset non-recursively.
460460
print_log debug "Including $ii for regular snapshot."
461461
TARGETS_REGULAR="${TARGETS_REGULAR:+$TARGETS_REGULAR }$ii" # nb: \t
462462
continue 2
@@ -468,7 +468,7 @@ do
468468
# Ibid regarding iii.
469469
jjj="$jj/"
470470

471-
# Check whether any included object is a prefix of the candidate name.
471+
# Check whether any included dataset is a prefix of the candidate name.
472472
if [ "$iii" != "${iii#$jjj}" ]
473473
then
474474
print_log debug "Excluding $ii because $jj includes it recursively."

0 commit comments

Comments
 (0)