Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for https://github.com/zfsonlinux/zfs/issues/581 #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/zfs/zfs_main.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);

Expand Down
11 changes: 5 additions & 6 deletions cmd/zpool/zpool_main.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1960,8 +1960,7 @@ zpool_do_import(int argc, char **argv)
* found.
*/
if (argc == 0 && first)
(void) fprintf(stderr,
gettext("no pools available to import\n"));
(void) fprintf(stderr, gettext("no pools available to import\n"));

error:
nvlist_free(props);
Expand Down Expand Up @@ -2358,7 +2357,7 @@ zpool_do_iostat(int argc, char **argv)
pool_list_update(list);

if ((npools = pool_list_count(list)) == 0)
(void) printf(gettext("no pools available\n"));
(void) fprintf(stderr, gettext("no pools available\n"));
else {
/*
* Refresh all statistics. This is done as an
Expand Down Expand Up @@ -2599,7 +2598,7 @@ zpool_do_list(int argc, char **argv)
list_callback, &cb);

if (argc == 0 && cb.cb_first)
(void) printf(gettext("no pools available\n"));
(void) fprintf(stderr, gettext("no pools available\n"));
else if (argc && cb.cb_first) {
/* cannot open the given pool */
zprop_free_list(cb.cb_proplist);
Expand Down Expand Up @@ -3793,7 +3792,7 @@ zpool_do_status(int argc, char **argv)
status_callback, &cb);

if (argc == 0 && cb.cb_count == 0)
(void) printf(gettext("no pools available\n"));
(void) fprintf(stderr, gettext("no pools available\n"));
else if (cb.cb_explain && cb.cb_first && cb.cb_allpools)
(void) printf(gettext("all pools are healthy\n"));

Expand Down Expand Up @@ -4219,7 +4218,7 @@ zpool_do_history(int argc, char **argv)
&cbdata);

if (argc == 0 && cbdata.first == B_TRUE) {
(void) printf(gettext("no pools available\n"));
(void) fprintf(stderr, gettext("no pools available\n"));
return (0);
}

Expand Down