diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-03-05 13:54:55 +0800 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2013-03-05 06:08:20 -0800 |
commit | 76fdd1c6932624e1783d5d53683919c35728c945 (patch) | |
tree | 77ef35d0b6008a242b26f1dbbaceefb737a76ced /lib/system | |
parent | 6f381004c354e0e0e2ce5303eb7a675cd1b32c57 (diff) | |
download | talos-petitboot-76fdd1c6932624e1783d5d53683919c35728c945.tar.gz talos-petitboot-76fdd1c6932624e1783d5d53683919c35728c945.zip |
Allow host programs to be configured
Rather than hard-coding in lib/system/system.c, this change adds a set
of #defines for host programs, through the autoheader config.h
These host programs can then be set through configure:
./configure HOST_PROG_MOUNT=/usr/bin/mount
Because we need to define nine host programs, we add an autoconf macro
to avoid repeating the definition code.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/system.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/system/system.c b/lib/system/system.c index 3b30f04..cbf6b9f 100644 --- a/lib/system/system.c +++ b/lib/system/system.c @@ -17,16 +17,16 @@ #include "system.h" const struct pb_system_apps pb_system_apps = { - .prefix = PREFIX, - .cp = "/bin/cp", - .kexec = "/sbin/kexec", - .mount = "/bin/mount", - .shutdown = "/sbin/shutdown", - .sftp = "/usr/bin/sftp", - .tftp = "/usr/bin/tftp", - .udevadm = "/sbin/udevadm", - .umount = "/bin/umount", - .wget = "/usr/bin/wget", + .prefix = PREFIX, + .cp = HOST_PROG_CP, + .kexec = HOST_PROG_KEXEC, + .mount = HOST_PROG_MOUNT, + .shutdown = HOST_PROG_SHUTDOWN, + .sftp = HOST_PROG_SFTP, + .tftp = HOST_PROG_TFTP, + .udevadm = HOST_PROG_UDEVADM, + .umount = HOST_PROG_UMOUNT, + .wget = HOST_PROG_WGET, }; int pb_mkdir_recursive(const char *dir) |