zpool upgrade return errors to stderr instead of stdout

Signed-off-by: Jacek Feflinski <feflik@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2955
This commit is contained in:
Jacek Fefliński 2014-12-10 13:24:14 +01:00 committed by Brian Behlendorf
parent 1b95fd5d70
commit c66989baae

View File

@ -4685,7 +4685,7 @@ upgrade_version(zpool_handle_t *zhp, uint64_t version)
return (ret); return (ret);
if (unsupp_fs) { if (unsupp_fs) {
(void) printf(gettext("Upgrade not performed due to %d " (void) fprintf(stderr, gettext("Upgrade not performed due to %d "
"unsupported filesystems (max v%d).\n"), "unsupported filesystems (max v%d).\n"),
unsupp_fs, (int) ZPL_VERSION); unsupp_fs, (int) ZPL_VERSION);
return (1); return (1);
@ -4900,7 +4900,7 @@ upgrade_one(zpool_handle_t *zhp, void *data)
int ret; int ret;
if (strcmp("log", zpool_get_name(zhp)) == 0) { if (strcmp("log", zpool_get_name(zhp)) == 0) {
(void) printf(gettext("'log' is now a reserved word\n" (void) fprintf(stderr, gettext("'log' is now a reserved word\n"
"Pool 'log' must be renamed using export and import" "Pool 'log' must be renamed using export and import"
" to upgrade.\n")); " to upgrade.\n"));
return (1); return (1);