mirror of
https://github.com/OpenRC/openrc.git
synced 2024-11-30 13:24:42 +08:00
Fix segfault when no coldplugged services, thanks to Daijo.
This commit is contained in:
parent
5a80daaf43
commit
0347f01345
@ -632,8 +632,9 @@ static void do_coldplug(void)
|
||||
/* Load our list of coldplugged services and display them */
|
||||
einfon("Device initiated services:%s", ecolor(ECOLOR_HILITE));
|
||||
coldplugged_services = rc_services_in_state(RC_SERVICE_COLDPLUGGED);
|
||||
TAILQ_FOREACH(s, coldplugged_services, entries)
|
||||
printf(" %s", s->value);
|
||||
if (coldplugged_services)
|
||||
TAILQ_FOREACH(s, coldplugged_services, entries)
|
||||
printf(" %s", s->value);
|
||||
printf ("%s\n", ecolor(ECOLOR_NORMAL));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user