zpool: main: print hostids with PRIx64

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12968
This commit is contained in:
наб 2022-01-12 17:29:50 +01:00 committed by Brian Behlendorf
parent 0f7a0cc7c2
commit bde0f7d4c6

View File

@ -3039,9 +3039,8 @@ show_import(nvlist_t *config, boolean_t report_error)
ZPOOL_CONFIG_MMP_HOSTID); ZPOOL_CONFIG_MMP_HOSTID);
(void) printf(gettext(" action: The pool must be " (void) printf(gettext(" action: The pool must be "
"exported from %s (hostid=%lx)\n\tbefore it " "exported from %s (hostid=%"PRIx64")\n\tbefore it "
"can be safely imported.\n"), hostname, "can be safely imported.\n"), hostname, hostid);
(unsigned long) hostid);
break; break;
case ZPOOL_STATUS_HOSTID_REQUIRED: case ZPOOL_STATUS_HOSTID_REQUIRED:
(void) printf(gettext(" action: Set a unique system " (void) printf(gettext(" action: Set a unique system "
@ -3170,9 +3169,9 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
(void) fprintf(stderr, gettext("cannot import '%s': " (void) fprintf(stderr, gettext("cannot import '%s': "
"pool is imported on %s (hostid: " "pool is imported on %s (hostid: "
"0x%lx)\nExport the pool on the other system, " "0x%"PRIx64")\nExport the pool on the other "
"then run 'zpool import'.\n"), "system, then run 'zpool import'.\n"),
name, hostname, (unsigned long) hostid); name, hostname, hostid);
} else if (mmp_state == MMP_STATE_NO_HOSTID) { } else if (mmp_state == MMP_STATE_NO_HOSTID) {
(void) fprintf(stderr, gettext("Cannot import '%s': " (void) fprintf(stderr, gettext("Cannot import '%s': "
"pool has the multihost property on and the\n" "pool has the multihost property on and the\n"
@ -3197,10 +3196,10 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
(void) fprintf(stderr, gettext("cannot import '%s': " (void) fprintf(stderr, gettext("cannot import '%s': "
"pool was previously in use from another system.\n" "pool was previously in use from another system.\n"
"Last accessed by %s (hostid=%lx) at %s" "Last accessed by %s (hostid=%"PRIx64") at %s"
"The pool can be imported, use 'zpool import -f' " "The pool can be imported, use 'zpool import -f' "
"to import the pool.\n"), name, hostname, "to import the pool.\n"), name, hostname,
(unsigned long)hostid, ctime(&timestamp)); hostid, ctime(&timestamp));
} }
return (1); return (1);