diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zfs/zfs_main.c | 34 | ||||
-rw-r--r-- | cmd/zinject/zinject.c | 4 | ||||
-rw-r--r-- | cmd/zpool/zpool_main.c | 10 |
3 files changed, 0 insertions, 48 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 8d75d2a45..d27fcbf46 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -318,7 +318,6 @@ safe_malloc(size_t size) return (data); } -#ifdef HAVE_ZPL static char * safe_strdup(char *str) { @@ -329,7 +328,6 @@ safe_strdup(char *str) return (dupstr); } -#endif /* HAVE_ZPL */ /* * Callback routine that will print out information for each of @@ -497,7 +495,6 @@ parse_depth(char *opt, int *flags) #define PROGRESS_DELAY 2 /* seconds */ -#ifdef HAVE_ZPL static char *pt_reverse = "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"; static time_t pt_begin; static char *pt_header = NULL; @@ -549,7 +546,6 @@ finish_progress(char *done) free(pt_header); pt_header = NULL; } -#endif /* HAVE_ZPL */ /* * zfs clone [-p] [-o prop=value] ... <snap> <fs | vol> @@ -631,7 +627,6 @@ zfs_do_clone(int argc, char **argv) ret = zfs_clone(zhp, argv[1], props); /* create the mountpoint if necessary */ -#ifdef HAVE_ZPL if (ret == 0) { zfs_handle_t *clone; @@ -643,7 +638,6 @@ zfs_do_clone(int argc, char **argv) zfs_close(clone); } } -#endif /* HAVE_ZPL */ zfs_close(zhp); nvlist_free(props); @@ -831,7 +825,6 @@ zfs_do_create(int argc, char **argv) * verbose error message to let the user know that their filesystem was * in fact created, even if we failed to mount or share it. */ -#ifdef HAVE_ZPL if (canmount == ZFS_CANMOUNT_ON) { if (zfs_mount(zhp, NULL, 0) != 0) { (void) fprintf(stderr, gettext("filesystem " @@ -843,7 +836,6 @@ zfs_do_create(int argc, char **argv) ret = 1; } } -#endif /* HAVE_ZPL */ error: if (zhp) @@ -2340,7 +2332,6 @@ typedef struct rollback_cbdata { * 'cb_dependent' is set, then this is a dependent and we should report it * without checking the transaction group. */ -#ifdef HAVE_ZPL static int rollback_check(zfs_handle_t *zhp, void *data) { @@ -2400,12 +2391,10 @@ rollback_check(zfs_handle_t *zhp, void *data) zfs_close(zhp); return (0); } -#endif /* HAVE_ZPL */ static int zfs_do_rollback(int argc, char **argv) { -#ifdef HAVE_ZPL int ret; int c; boolean_t force = B_FALSE; @@ -2487,9 +2476,6 @@ out: return (0); else return (1); -#else - return ENOSYS; -#endif /*HAVE_ZPL*/ } /* @@ -2955,7 +2941,6 @@ zfs_do_release(int argc, char **argv) #define SPINNER_TIME 3 /* seconds */ #define MOUNT_TIME 5 /* seconds */ -#ifdef HAVE_ZPL static int get_one_dataset(zfs_handle_t *zhp, void *data) { @@ -3400,7 +3385,6 @@ share_mount(int op, int argc, char **argv) return (ret); } -#endif /* HAVE_ZPL */ /* * zfs mount -a [nfs] @@ -3411,11 +3395,7 @@ share_mount(int op, int argc, char **argv) static int zfs_do_mount(int argc, char **argv) { -#ifdef HAVE_ZPL return (share_mount(OP_MOUNT, argc, argv)); -#else - return ENOSYS; -#endif /* HAVE_ZPL */ } /* @@ -3427,14 +3407,9 @@ zfs_do_mount(int argc, char **argv) static int zfs_do_share(int argc, char **argv) { -#ifdef HAVE_ZPL return (share_mount(OP_SHARE, argc, argv)); -#else - return ENOSYS; -#endif /* HAVE_ZPL */ } -#ifdef HAVE_ZPL typedef struct unshare_unmount_node { zfs_handle_t *un_zhp; char *un_mountp; @@ -3818,7 +3793,6 @@ unshare_unmount(int op, int argc, char **argv) return (ret); } -#endif /* HAVE_ZPL */ /* * zfs unmount -a @@ -3829,11 +3803,7 @@ unshare_unmount(int op, int argc, char **argv) static int zfs_do_unmount(int argc, char **argv) { -#ifdef HAVE_ZPL return (unshare_unmount(OP_MOUNT, argc, argv)); -#else - return ENOSYS; -#endif /* HAVE_ZPL */ } /* @@ -3845,11 +3815,7 @@ zfs_do_unmount(int argc, char **argv) static int zfs_do_unshare(int argc, char **argv) { -#ifdef HAVE_ZPL return (unshare_unmount(OP_SHARE, argc, argv)); -#else - return ENOSYS; -#endif /* HAVE_ZPL */ } /* ARGSUSED */ diff --git a/cmd/zinject/zinject.c b/cmd/zinject/zinject.c index e76e626fa..d584eadd8 100644 --- a/cmd/zinject/zinject.c +++ b/cmd/zinject/zinject.c @@ -951,20 +951,16 @@ main(int argc, char **argv) if (dataset[0] != '\0' && domount) { if ((zhp = zfs_open(g_zfs, dataset, ZFS_TYPE_DATASET)) == NULL) return (1); -#ifdef HAVE_ZPL if (zfs_unmount(zhp, NULL, 0) != 0) return (1); -#endif /* HAVE_ZPL */ } record.zi_error = error; ret = register_handler(pool, flags, &record, quiet); -#ifdef HAVE_ZPL if (dataset[0] != '\0' && domount) ret = (zfs_mount(zhp, NULL, 0) != 0); -#endif /* HAVE_ZPL */ libzfs_fini(g_zfs); diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 1e9b3b69e..bad4e2a4f 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -716,9 +716,7 @@ zpool_do_create(int argc, char **argv) (strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) != 0 && strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) != 0)) { char buf[MAXPATHLEN]; -#ifdef HAVE_ZPL DIR *dirp; -#endif if (mountpoint && mountpoint[0] != '/') { (void) fprintf(stderr, gettext("invalid mountpoint " @@ -743,7 +741,6 @@ zpool_do_create(int argc, char **argv) mountpoint); } -#ifdef HAVE_ZPL if ((dirp = opendir(buf)) == NULL && errno != ENOENT) { (void) fprintf(stderr, gettext("mountpoint '%s' : " "%s\n"), buf, strerror(errno)); @@ -766,7 +763,6 @@ zpool_do_create(int argc, char **argv) goto errout; } } -#endif /* HAVE_ZPL */ } if (dryrun) { @@ -797,12 +793,8 @@ zpool_do_create(int argc, char **argv) zfs_prop_to_name( ZFS_PROP_MOUNTPOINT), mountpoint) == 0); -#ifdef HAVE_ZPL if (zfs_mount(pool, NULL, 0) == 0) ret = zfs_shareall(pool); -#else - ret = 0; -#endif /* HAVE_ZPL */ zfs_close(pool); } } else if (libzfs_errno(g_zfs) == EZFS_INVALIDNAME) { @@ -1579,14 +1571,12 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts, if ((zhp = zpool_open_canfail(g_zfs, name)) == NULL) return (1); -#if HAVE_ZPL if (zpool_get_state(zhp) != POOL_STATE_UNAVAIL && !(flags & ZFS_IMPORT_ONLY) && zpool_enable_datasets(zhp, mntopts, 0) != 0) { zpool_close(zhp); return (1); } -#endif /* HAVE_ZPL */ zpool_close(zhp); return (0); |