mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
Refactor libzfs_error_init newlines
Move the trailing newlines from the error message strings to the format strings to more closely match the other error messages. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9330
This commit is contained in:
parent
444df1051c
commit
3ec97ba6f1
@ -489,7 +489,7 @@ main(int argc, char **argv)
|
|||||||
zfsutil = 1;
|
zfsutil = 1;
|
||||||
|
|
||||||
if ((g_zfs = libzfs_init()) == NULL) {
|
if ((g_zfs = libzfs_init()) == NULL) {
|
||||||
(void) fprintf(stderr, "%s", libzfs_error_init(errno));
|
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
||||||
return (MOUNT_SYSERR);
|
return (MOUNT_SYSERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8172,7 +8172,7 @@ main(int argc, char **argv)
|
|||||||
return (zfs_do_version(argc, argv));
|
return (zfs_do_version(argc, argv));
|
||||||
|
|
||||||
if ((g_zfs = libzfs_init()) == NULL) {
|
if ((g_zfs = libzfs_init()) == NULL) {
|
||||||
(void) fprintf(stderr, "%s", libzfs_error_init(errno));
|
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -763,7 +763,7 @@ main(int argc, char **argv)
|
|||||||
uint32_t dvas = 0;
|
uint32_t dvas = 0;
|
||||||
|
|
||||||
if ((g_zfs = libzfs_init()) == NULL) {
|
if ((g_zfs = libzfs_init()) == NULL) {
|
||||||
(void) fprintf(stderr, "%s", libzfs_error_init(errno));
|
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9282,7 +9282,7 @@ main(int argc, char **argv)
|
|||||||
return (zpool_do_version(argc, argv));
|
return (zpool_do_version(argc, argv));
|
||||||
|
|
||||||
if ((g_zfs = libzfs_init()) == NULL) {
|
if ((g_zfs = libzfs_init()) == NULL) {
|
||||||
(void) fprintf(stderr, "%s", libzfs_error_init(errno));
|
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,21 +69,21 @@ libzfs_error_init(int error)
|
|||||||
case ENXIO:
|
case ENXIO:
|
||||||
return (dgettext(TEXT_DOMAIN, "The ZFS modules are not "
|
return (dgettext(TEXT_DOMAIN, "The ZFS modules are not "
|
||||||
"loaded.\nTry running '/sbin/modprobe zfs' as root "
|
"loaded.\nTry running '/sbin/modprobe zfs' as root "
|
||||||
"to load them.\n"));
|
"to load them."));
|
||||||
case ENOENT:
|
case ENOENT:
|
||||||
return (dgettext(TEXT_DOMAIN, "/dev/zfs and /proc/self/mounts "
|
return (dgettext(TEXT_DOMAIN, "/dev/zfs and /proc/self/mounts "
|
||||||
"are required.\nTry running 'udevadm trigger' and 'mount "
|
"are required.\nTry running 'udevadm trigger' and 'mount "
|
||||||
"-t proc proc /proc' as root.\n"));
|
"-t proc proc /proc' as root."));
|
||||||
case ENOEXEC:
|
case ENOEXEC:
|
||||||
return (dgettext(TEXT_DOMAIN, "The ZFS modules cannot be "
|
return (dgettext(TEXT_DOMAIN, "The ZFS modules cannot be "
|
||||||
"auto-loaded.\nTry running '/sbin/modprobe zfs' as "
|
"auto-loaded.\nTry running '/sbin/modprobe zfs' as "
|
||||||
"root to manually load them.\n"));
|
"root to manually load them."));
|
||||||
case EACCES:
|
case EACCES:
|
||||||
return (dgettext(TEXT_DOMAIN, "Permission denied the "
|
return (dgettext(TEXT_DOMAIN, "Permission denied the "
|
||||||
"ZFS utilities must be run as root.\n"));
|
"ZFS utilities must be run as root."));
|
||||||
default:
|
default:
|
||||||
return (dgettext(TEXT_DOMAIN, "Failed to initialize the "
|
return (dgettext(TEXT_DOMAIN, "Failed to initialize the "
|
||||||
"libzfs library.\n"));
|
"libzfs library."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user