summaryrefslogtreecommitdiffstats
path: root/devices.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2007-04-04 15:54:42 +1000
committerJeremy Kerr <jk@ozlabs.org>2007-04-04 15:54:42 +1000
commitf2c8c4c7197ef61c0378ffbeb4649d28bfcbba06 (patch)
tree287045a1762342bcc07bb1080b5021ed9a4cd0ed /devices.c
parent188f491cdfabc8e01bc483e3652f4f8306311920 (diff)
downloadtalos-petitboot-f2c8c4c7197ef61c0378ffbeb4649d28bfcbba06.tar.gz
talos-petitboot-f2c8c4c7197ef61c0378ffbeb4649d28bfcbba06.zip
Allow petitboot to run udevtrigger on start
Add an option (-u) to run udevtrigger when petitboot is ready for device discovery. Also add -h to explain what -u does. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'devices.c')
-rw-r--r--devices.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/devices.c b/devices.c
index 43a388d..4936f9a 100644
--- a/devices.c
+++ b/devices.c
@@ -238,7 +238,7 @@ static twin_bool_t pboot_proc_server_sock(int sock, twin_file_op_t ops,
return TWIN_TRUE;
}
-int pboot_start_device_discovery(void)
+int pboot_start_device_discovery(int udev_trigger)
{
int sock;
struct sockaddr_un addr;
@@ -269,6 +269,12 @@ int pboot_start_device_discovery(void)
twin_set_file(pboot_proc_server_sock, sock, TWIN_READ, &_ctx);
+ if (udev_trigger) {
+ int rc = system("udevtrigger");
+ if (rc)
+ LOG("udevtrigger failed, rc %d\n", rc);
+ }
+
return TWIN_TRUE;
}
OpenPOWER on IntegriCloud