git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Export ZFS symbols needed by Lustre.
[zfs.git]
/
cmd
/
zpool
/
zpool_main.c
diff --git
a/cmd/zpool/zpool_main.c
b/cmd/zpool/zpool_main.c
index
b1b71ac
..
3859bf7
100644
(file)
--- a/
cmd/zpool/zpool_main.c
+++ b/
cmd/zpool/zpool_main.c
@@
-4712,14
+4712,6
@@
main(int argc, char **argv)
(void) setlocale(LC_ALL, "");
(void) textdomain(TEXT_DOMAIN);
(void) setlocale(LC_ALL, "");
(void) textdomain(TEXT_DOMAIN);
- if ((g_zfs = libzfs_init()) == NULL) {
- (void) fprintf(stderr, gettext("internal error: failed to "
- "initialize ZFS library\n"));
- return (1);
- }
-
- libzfs_print_on_error(g_zfs, B_TRUE);
-
opterr = 0;
/*
opterr = 0;
/*
@@
-4735,9
+4727,15
@@
main(int argc, char **argv)
/*
* Special case '-?'
*/
/*
* Special case '-?'
*/
- if (strcmp(cmdname, "-?") == 0)
+ if ((strcmp(cmdname, "-?") == 0) ||
+ strcmp(cmdname, "--help") == 0)
usage(B_TRUE);
usage(B_TRUE);
+ if ((g_zfs = libzfs_init()) == NULL)
+ return (1);
+
+ libzfs_print_on_error(g_zfs, B_TRUE);
+
zpool_set_history_str("zpool", argc, argv, history_str);
verify(zpool_stage_history(g_zfs, history_str) == 0);
zpool_set_history_str("zpool", argc, argv, history_str);
verify(zpool_stage_history(g_zfs, history_str) == 0);