Print this page
2882 implement libzfs_core
2883 changing "canmount" property to "on" should not always remount dataset
2900 "zfs snapshot" should be able to create multiple, arbitrary snapshots at once
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Chris Siden <christopher.siden@delphix.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Bill Pijewski <wdp@joyent.com>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>

*** 20,30 **** */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. ! * Copyright (c) 2011 by Delphix. All rights reserved. */ #include <stdio.h> #include <stdlib.h> #include <strings.h> --- 20,30 ---- */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. ! * Copyright (c) 2012 by Delphix. All rights reserved. */ #include <stdio.h> #include <stdlib.h> #include <strings.h>
*** 299,314 **** */ int zfs_iter_snapspec(zfs_handle_t *fs_zhp, const char *spec_orig, zfs_iter_f func, void *arg) { ! char buf[ZFS_MAXNAMELEN]; ! char *comma_separated, *cp; int err = 0; int ret = 0; ! (void) strlcpy(buf, spec_orig, sizeof (buf)); cp = buf; while ((comma_separated = strsep(&cp, ",")) != NULL) { char *pct = strchr(comma_separated, '%'); if (pct != NULL) { --- 299,313 ---- */ int zfs_iter_snapspec(zfs_handle_t *fs_zhp, const char *spec_orig, zfs_iter_f func, void *arg) { ! char *buf, *comma_separated, *cp; int err = 0; int ret = 0; ! buf = zfs_strdup(fs_zhp->zfs_hdl, spec_orig); cp = buf; while ((comma_separated = strsep(&cp, ",")) != NULL) { char *pct = strchr(comma_separated, '%'); if (pct != NULL) {
*** 362,371 **** --- 361,371 ---- if (ret == 0) ret = err; } } + free(buf); return (ret); } /* * Iterate over all children, snapshots and filesystems