- // loop trying to lock for reboot (i.e. no volumes are busy)
- do {
- nretries--;
- macherr = kextmanager_lock_reboot(kxport, myport, busyDev, &busyStatus);
- if (macherr) goto finish;
-
- if (busyStatus == EBUSY) {
- if (*busyDev) {
- warnx("%s is busy updating; delaying reboot (%d retries left)",
- busyDev, nretries);
- } else
- warnx("kextd still starting up");
- if (nretries) sleep(LCK_DELAY); // don't sleep the last time
- }
- } while (busyStatus == EBUSY && nretries > 0);
+ // try to lock for reboot
+ macherr = kextmanager_lock_reboot(kxport, myport, !WAITFORLOCK, busyVol,
+ &busyStatus);
+ if (macherr) goto finish;