Rebase master to b105

This commit is contained in:
Brian Behlendorf
2009-01-15 13:59:39 -08:00
parent 42bcb36c89
commit fb5f0bc833
50 changed files with 1602 additions and 849 deletions
+10 -2
View File
@@ -877,17 +877,21 @@ int
zpool_do_export(int argc, char **argv)
{
boolean_t force = B_FALSE;
boolean_t hardforce = B_FALSE;
int c;
zpool_handle_t *zhp;
int ret;
int i;
/* check options */
while ((c = getopt(argc, argv, "f")) != -1) {
while ((c = getopt(argc, argv, "fF")) != -1) {
switch (c) {
case 'f':
force = B_TRUE;
break;
case 'F':
hardforce = B_TRUE;
break;
case '?':
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
optopt);
@@ -917,8 +921,12 @@ zpool_do_export(int argc, char **argv)
continue;
}
if (zpool_export(zhp, force) != 0)
if (hardforce) {
if (zpool_export_force(zhp) != 0)
ret = 1;
} else if (zpool_export(zhp, force) != 0) {
ret = 1;
}
zpool_close(zhp);
}