mirror of
https://github.com/opnsense/src.git
synced 2026-05-19 08:25:22 -04:00
Don't quit on first failure, just skip failures.
This commit is contained in:
parent
2e03d4887d
commit
c37e2f9bbf
1 changed files with 6 additions and 6 deletions
|
|
@ -231,12 +231,12 @@ g_mirror_ctl_rebuild(struct gctl_req *req, struct g_class *mp)
|
|||
name = gctl_get_asciiparam(req, param);
|
||||
if (name == NULL) {
|
||||
gctl_error(req, "No 'arg%u' argument.", i);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
disk = g_mirror_find_disk(sc, name);
|
||||
if (disk == NULL) {
|
||||
gctl_error(req, "No such provider: %s.", name);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
if (g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) == 1 &&
|
||||
disk->d_state == G_MIRROR_DISK_STATE_ACTIVE) {
|
||||
|
|
@ -464,12 +464,12 @@ g_mirror_ctl_remove(struct gctl_req *req, struct g_class *mp)
|
|||
name = gctl_get_asciiparam(req, param);
|
||||
if (name == NULL) {
|
||||
gctl_error(req, "No 'arg%u' argument.", i);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
disk = g_mirror_find_disk(sc, name);
|
||||
if (disk == NULL) {
|
||||
gctl_error(req, "No such provider: %s.", name);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
g_mirror_event_send(disk, G_MIRROR_DISK_STATE_DESTROY,
|
||||
G_MIRROR_EVENT_WAIT);
|
||||
|
|
@ -512,12 +512,12 @@ g_mirror_ctl_deactivate(struct gctl_req *req, struct g_class *mp)
|
|||
name = gctl_get_asciiparam(req, param);
|
||||
if (name == NULL) {
|
||||
gctl_error(req, "No 'arg%u' argument.", i);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
disk = g_mirror_find_disk(sc, name);
|
||||
if (disk == NULL) {
|
||||
gctl_error(req, "No such provider: %s.", name);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
* Do rebuild by resetting syncid and disconnecting disk.
|
||||
|
|
|
|||
Loading…
Reference in a new issue