From 76fdd1c6932624e1783d5d53683919c35728c945 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Tue, 5 Mar 2013 13:54:55 +0800 Subject: 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 Signed-off-by: Geoff Levand --- lib/system/system.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/system') 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) -- cgit v1.2.1