disk.c: added kludge against premature failure

This hardcoded pause is ugly indeed but forcing users
into wondering what goes on behind bootsplash *sometimes*
(depending on usbflash controller type *and* state) is worse.

Any ideas on reliably fixing this are welcome, of course.

See also http://bugzilla.altlinux.org/30315
This commit is contained in:
Michael Shigorin 2016-10-24 21:39:22 +03:00
parent 1e5703a8a8
commit 0547f60638

7
disk.c
View File

@ -359,6 +359,13 @@ enum return_type disk_prepare(void)
return RETURN_BACK;
}
if (try_with_uuidlabel() == RETURN_OK)
return RETURN_OK;
/* let's try this again after having waited a bit for
* some slower/more sophisticated controllers to init */
spawn(udevtrigger_add);
sleep(2);
if (try_with_uuidlabel() == RETURN_OK)
return RETURN_OK;