mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Add libzutil for libzfs or libzpool consumers
Adds a libzutil for utility functions that are common to libzfs and libzpool consumers (most of what was in libzfs_import.c). This removes the need for utilities to link against both libzpool and libzfs. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Don Brady <don.brady@delphix.com> Closes #8050
This commit is contained in:
committed by
Brian Behlendorf
parent
6644e5bb6e
commit
e89f1295d4
@@ -561,6 +561,7 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
||||
|
||||
if (ioctl(zfs_fd, ZFS_IOC_INJECT_FAULT, &zc) != 0) {
|
||||
(void) fprintf(stderr, "failed to add handler: %s\n",
|
||||
errno == EDOM ? "block level exceeds max level of object" :
|
||||
strerror(errno));
|
||||
return (1);
|
||||
}
|
||||
@@ -853,6 +854,7 @@ main(int argc, char **argv)
|
||||
break;
|
||||
case 'r':
|
||||
range = optarg;
|
||||
flags |= ZINJECT_CALC_RANGE;
|
||||
break;
|
||||
case 's':
|
||||
dur_secs = 1;
|
||||
|
||||
Reference in New Issue
Block a user