diff options
author | lling <none@none> | 2006-12-13 15:07:18 -0800 |
---|---|---|
committer | lling <none@none> | 2006-12-13 15:07:18 -0800 |
commit | ece3d9b3bacef51a5f34d993935eedbb7bb87059 (patch) | |
tree | c7f8131fb0d806ed7efdfbb25312c2720e5752b3 /usr/src/lib/libzfs/common/libzfs_util.c | |
parent | 73aa1a35203ed8026231eadb94c4ea8961215ace (diff) | |
download | illumos-joyent-ece3d9b3bacef51a5f34d993935eedbb7bb87059.tar.gz |
6480245 renaming a dataset to something with '%s' will cause segfault
Diffstat (limited to 'usr/src/lib/libzfs/common/libzfs_util.c')
-rw-r--r-- | usr/src/lib/libzfs/common/libzfs_util.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_util.c b/usr/src/lib/libzfs/common/libzfs_util.c index 14be406f11..48ee3f509e 100644 --- a/usr/src/lib/libzfs/common/libzfs_util.c +++ b/usr/src/lib/libzfs/common/libzfs_util.c @@ -199,15 +199,21 @@ zfs_verror(libzfs_handle_t *hdl, int error, const char *fmt, va_list ap) } (void) fprintf(stderr, "%s: %s\n", hdl->libzfs_action, - libzfs_error_description(hdl)); + libzfs_error_description(hdl)); if (error == EZFS_NOMEM) exit(1); } } +int +zfs_error(libzfs_handle_t *hdl, int error, const char *msg) +{ + return (zfs_error_fmt(hdl, error, "%s", msg)); +} + /*PRINTFLIKE3*/ int -zfs_error(libzfs_handle_t *hdl, int error, const char *fmt, ...) +zfs_error_fmt(libzfs_handle_t *hdl, int error, const char *fmt, ...) { va_list ap; @@ -242,9 +248,15 @@ zfs_common_error(libzfs_handle_t *hdl, int error, const char *fmt, return (0); } +int +zfs_standard_error(libzfs_handle_t *hdl, int error, const char *msg) +{ + return (zfs_standard_error_fmt(hdl, error, "%s", msg)); +} + /*PRINTFLIKE3*/ int -zfs_standard_error(libzfs_handle_t *hdl, int error, const char *fmt, ...) +zfs_standard_error_fmt(libzfs_handle_t *hdl, int error, const char *fmt, ...) { va_list ap; @@ -294,9 +306,15 @@ zfs_standard_error(libzfs_handle_t *hdl, int error, const char *fmt, ...) return (-1); } +int +zpool_standard_error(libzfs_handle_t *hdl, int error, const char *msg) +{ + return (zpool_standard_error_fmt(hdl, error, "%s", msg)); +} + /*PRINTFLIKE3*/ int -zpool_standard_error(libzfs_handle_t *hdl, int error, const char *fmt, ...) +zpool_standard_error_fmt(libzfs_handle_t *hdl, int error, const char *fmt, ...) { va_list ap; |