diff options
author | Gregor Kopka <[email protected]> | 2012-03-14 14:34:00 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-03-15 10:24:00 -0700 |
commit | 42cb3819f1a1f536105faac81ffc150f3da90a80 (patch) | |
tree | 5458e28574eb444d18bcb4ab8388e1d9db93e6c2 /cmd/zfs | |
parent | 0ece356db51e225c3d4a26dff7cf67c99b6b9c55 (diff) |
Use stderr for 'no pools/datasets available' error
The 'zfs list' and 'zpool list' commands output the message
'no datasets/pools available' to stdout. This should go to
stderr and only the available datasets/pools should go to
stdout. Returning nothing to stdout is expected behavior
when there is nothing to list.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #581
Diffstat (limited to 'cmd/zfs')
-rwxr-xr-x[-rw-r--r--] | cmd/zfs/zfs_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 518000cf1..b88ab0986 100644..100755 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -2834,7 +2834,7 @@ zfs_do_list(int argc, char **argv) zfs_free_sort_columns(sortcol); if (ret == 0 && cb.cb_first && !cb.cb_scripted) - (void) printf(gettext("no datasets available\n")); + (void) fprintf(stderr, gettext("no datasets available\n")); return (ret); } @@ -5139,7 +5139,7 @@ zfs_do_holds(int argc, char **argv) print_holds(scripted, cb.cb_max_namelen, cb.cb_max_taglen, nvl); if (nvlist_empty(nvl)) - (void) printf(gettext("no datasets available\n")); + (void) fprintf(stderr, gettext("no datasets available\n")); nvlist_free(nvl); |