diff options
| author | Chris Lumens <clumens@redhat.com> | 2005-03-01 16:27:14 +0000 |
|---|---|---|
| committer | Chris Lumens <clumens@redhat.com> | 2005-03-01 16:27:14 +0000 |
| commit | 258dceb2feea2716d996757f7c8d9594391663c4 (patch) | |
| tree | 6892bfcfa8cd87d8fef7caf3575ad4e4819df62c /loader2 | |
| parent | 065ecf29a264fdaec6c402afd0d853c7713bf61b (diff) | |
Fix nested case statements in a switch to silence a gcc4 warning.
Diffstat (limited to 'loader2')
| -rw-r--r-- | loader2/driverdisk.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/loader2/driverdisk.c b/loader2/driverdisk.c index 6b1928d54..ff60f4c1b 100644 --- a/loader2/driverdisk.c +++ b/loader2/driverdisk.c @@ -239,6 +239,7 @@ int loadDriverFromMedia(int class, moduleList modLoaded, DEV_DONE } stage = DEV_DEVICE; int rc, num = 0; int dir = 1; + int found = 0, before = 0; while (stage != DEV_DONE) { switch(stage) { @@ -419,9 +420,11 @@ int loadDriverFromMedia(int class, moduleList modLoaded, break; } case DEV_LOAD: { - int found = 0, before = 0; struct device ** devices; + before = 0; + found = 0; + devices = probeDevices(class, BUS_UNSPEC, PROBE_LOADED); if (devices) for(; devices[before]; before++); @@ -445,8 +448,11 @@ int loadDriverFromMedia(int class, moduleList modLoaded, unlink("/tmp/drivers"); umount("/tmp/dpart"); } + } + + case DEV_PROBE: { + struct device ** devices; - case DEV_PROBE: /* if they didn't specify that we should probe, then we should * just fall out */ if (noprobe) { @@ -474,7 +480,7 @@ int loadDriverFromMedia(int class, moduleList modLoaded, "like to manually select the driver, " "continue anyway, or load another " "driver disk?")); - + if (rc == 2) { /* if they choose to continue, just go ahead and continue */ stage = DEV_DONE; @@ -494,8 +500,7 @@ int loadDriverFromMedia(int class, moduleList modLoaded, break; } - - + case DEV_DONE: break; } |
