summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ce043f8)
UDEVD_EXPECTED_SEQNUM=$[`cat /sys/kernel/hotplug_seqnum` + 1] ./udevd -d
will init udevd, so the next event will not wait for any timeout.
int fd;
struct sigaction act;
fd_set readfds;
int fd;
struct sigaction act;
fd_set readfds;
+ const char *udevd_expected_seqnum;
logging_init("udevd");
dbg("version %s", UDEV_VERSION);
logging_init("udevd");
dbg("version %s", UDEV_VERSION);
else
udev_bin = UDEV_BIN;
else
udev_bin = UDEV_BIN;
- /* handle special startup timeout*/
+ /* possible set of expected_seqnum number */
+ udevd_expected_seqnum = getenv("UDEVD_EXPECTED_SEQNUM");
+ if (udevd_expected_seqnum != NULL) {
+ expected_seqnum = strtoull(udevd_expected_seqnum, NULL, 10);
+ dbg("initialize expected_seqnum to %llu", expected_seqnum);
+ }
+
+ /* get current time to provide shorter startup timeout */
sysinfo(&info);
startup_time = info.uptime;
sysinfo(&info);
startup_time = info.uptime;