Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2008-12-17 14:30:23 -08:00
commit df30abba57
1 changed files with 9 additions and 17 deletions

View File

@ -846,7 +846,7 @@ destroy_callback(zfs_handle_t *zhp, void *data)
zfs_close(zhp); zfs_close(zhp);
return (-1); return (-1);
} }
#endif /* HAVE_ZPL */ #endif /* HAVE_ZPL */
zfs_close(zhp); zfs_close(zhp);
return (0); return (0);
@ -3148,7 +3148,6 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol,
*/ */
switch (op) { switch (op) {
case OP_SHARE: case OP_SHARE:
#ifdef HAVE_ZPL
shared_nfs = zfs_is_shared_nfs(zhp, NULL); shared_nfs = zfs_is_shared_nfs(zhp, NULL);
shared_smb = zfs_is_shared_smb(zhp, NULL); shared_smb = zfs_is_shared_smb(zhp, NULL);
@ -3188,16 +3187,8 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol,
} }
break; break;
#else
/* zfs-lustre: unsupported operation */
(void) fprintf(stderr, gettext("cannot share "
"'%s': unsupported operation\n"),
zfs_get_name(zhp));
return (1);
#endif /* HAVE_ZPL */
case OP_MOUNT: case OP_MOUNT:
#ifdef HAVE_ZPL
if (options == NULL) if (options == NULL)
mnt.mnt_mntopts = ""; mnt.mnt_mntopts = "";
else else
@ -3218,13 +3209,6 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol,
return (1); return (1);
break; break;
#else
/* zfs-lustre: unsupported operation */
(void) fprintf(stderr, gettext("cannot mount "
"'%s': unsupported operation\n"),
zfs_get_name(zhp));
return (1);
#endif /* HAVE_ZPL */
} }
} else { } else {
assert(op == OP_SHARE); assert(op == OP_SHARE);
@ -3482,6 +3466,8 @@ zfs_do_mount(int argc, char **argv)
{ {
#ifdef HAVE_ZPL #ifdef HAVE_ZPL
return (share_mount(OP_MOUNT, argc, argv)); return (share_mount(OP_MOUNT, argc, argv));
#else
return ENOSYS;
#endif /* HAVE_ZPL */ #endif /* HAVE_ZPL */
} }
@ -3496,6 +3482,8 @@ zfs_do_share(int argc, char **argv)
{ {
#ifdef HAVE_ZPL #ifdef HAVE_ZPL
return (share_mount(OP_SHARE, argc, argv)); return (share_mount(OP_SHARE, argc, argv));
#else
return ENOSYS;
#endif /* HAVE_ZPL */ #endif /* HAVE_ZPL */
} }
@ -3965,6 +3953,8 @@ zfs_do_unmount(int argc, char **argv)
{ {
#ifdef HAVE_ZPL #ifdef HAVE_ZPL
return (unshare_unmount(OP_MOUNT, argc, argv)); return (unshare_unmount(OP_MOUNT, argc, argv));
#else
return ENOSYS;
#endif /* HAVE_ZPL */ #endif /* HAVE_ZPL */
} }
@ -3979,6 +3969,8 @@ zfs_do_unshare(int argc, char **argv)
{ {
#ifdef HAVE_ZPL #ifdef HAVE_ZPL
return (unshare_unmount(OP_SHARE, argc, argv)); return (unshare_unmount(OP_SHARE, argc, argv));
#else
return ENOSYS;
#endif /* HAVE_ZPL */ #endif /* HAVE_ZPL */
} }