Mercurial > illumos > illumos-gate
changeset 3841:496dd81e3d5c
6449807 'zfs rename <vol@snap>' does not re-create device link
author | mmusante |
---|---|
date | Fri, 16 Mar 2007 12:20:21 -0700 |
parents | b68d0a840b35 |
children | e67ad389b114 |
files | usr/src/lib/libzfs/common/libzfs_changelist.c |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libzfs/common/libzfs_changelist.c Fri Mar 16 10:35:25 2007 -0700 +++ b/usr/src/lib/libzfs/common/libzfs_changelist.c Fri Mar 16 12:20:21 2007 -0700 @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -230,18 +230,15 @@ * Is this "dataset" a child of "parent"? */ static boolean_t -isa_child_of(char *dataset, const char *parent) +isa_child_of(const char *dataset, const char *parent) { int len; - /* snapshot does not have a child */ - if (strchr(parent, '@')) - return (B_FALSE); - len = strlen(parent); if (strncmp(dataset, parent, len) == 0 && - (dataset[len] == '/' || dataset[len] == '\0')) + (dataset[len] == '@' || dataset[len] == '/' || + dataset[len] == '\0')) return (B_TRUE); else return (B_FALSE);