summaryrefslogtreecommitdiffstats
path: root/lib/system/system.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-09-25 14:23:39 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-09-26 14:30:17 +0800
commitca5a62c1d04a3eea1d1c307d4fa4f0b1559140d2 (patch)
tree022367e0be0f9207dd4b7c4c87a3b85ea4717602 /lib/system/system.c
parent7889b6f4bf81a1d2742c6f7d6fb9f6f603dd251e (diff)
downloadtalos-petitboot-ca5a62c1d04a3eea1d1c307d4fa4f0b1559140d2.tar.gz
talos-petitboot-ca5a62c1d04a3eea1d1c307d4fa4f0b1559140d2.zip
discover: Don't depend on tftp failure for type detection
Rather than always trying both TFTP client types, do a runtime detection on first invocation. This can be fixed at build-time with --with-tftp=TYPE. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/system/system.c')
-rw-r--r--lib/system/system.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system/system.c b/lib/system/system.c
index 6e80b24..c9fe979 100644
--- a/lib/system/system.c
+++ b/lib/system/system.c
@@ -30,6 +30,12 @@ const struct pb_system_apps pb_system_apps = {
.udhcpc = HOST_PROG_UDHCPC,
};
+#ifndef TFTP_TYPE
+#define TFTP_TYPE TFTP_TYPE_UNKNOWN
+#endif
+
+enum tftp_type tftp_type = TFTP_TYPE;
+
int pb_mkdir_recursive(const char *dir)
{
struct stat statbuf;
OpenPOWER on IntegriCloud