if (!fp) {
(void) fprintf(stderr, gettext(
"filesystem '%s' was mounted, but /etc/mtab "
- "could not be opened due to error %d\n"),
- dataset, errno);
+ "could not be opened due to error: %s\n"),
+ dataset, strerror(errno));
return (MOUNT_FILEIO);
}
if (error) {
(void) fprintf(stderr, gettext(
"filesystem '%s' was mounted, but /etc/mtab "
- "could not be updated due to error %d\n"),
- dataset, errno);
+ "could not be updated due to error: %s\n"),
+ dataset, strerror(errno));
return (MOUNT_FILEIO);
}
/* canonicalize the mount point */
if (realpath(argv[1], mntpoint) == NULL) {
(void) fprintf(stderr, gettext("filesystem '%s' cannot be "
- "mounted at '%s' due to canonicalization error %d.\n"),
- dataset, argv[1], errno);
+ "mounted at '%s' due to canonicalization error: %s\n"),
+ dataset, argv[1], strerror(errno));
return (MOUNT_SYSERR);
}