Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154455588
D3994.id9670.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3994.id9670.diff
View Options
Index: cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
===================================================================
--- cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
+++ cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
@@ -5600,7 +5600,7 @@
const char *zname = zfs_get_name(zhp);
size_t znamelen = strnlen(zname, ZFS_MAXNAMELEN);
- if (cbp->cb_recursive) {
+ if (cbp->cb_recursive && cbp->cb_snapname != NULL) {
const char *snapname;
char *delim = strchr(zname, '@');
if (delim == NULL)
@@ -5684,18 +5684,14 @@
for (i = 0; i < argc; ++i) {
char *snapshot = argv[i];
const char *delim;
- const char *snapname;
+ const char *snapname = NULL;
delim = strchr(snapshot, '@');
- if (delim == NULL) {
- (void) fprintf(stderr,
- gettext("'%s' is not a snapshot\n"), snapshot);
- ++errors;
- continue;
+ if (delim != NULL) {
+ snapname = delim + 1;
+ if (recursive)
+ snapshot[delim - snapshot] = '\0';
}
- snapname = delim + 1;
- if (recursive)
- snapshot[delim - snapshot] = '\0';
cb.cb_recursive = recursive;
cb.cb_snapname = snapname;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 4:11 PM (7 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32302195
Default Alt Text
D3994.id9670.diff (1 KB)
Attached To
Mode
D3994: Extend 'zfs holds -r' to accept a dataset, instead of only a snapshot as input
Attached
Detach File
Event Timeline
Log In to Comment