From ca5a62c1d04a3eea1d1c307d4fa4f0b1559140d2 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 25 Sep 2013 14:23:39 +0800 Subject: 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 --- lib/system/system.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/system/system.h') diff --git a/lib/system/system.h b/lib/system/system.h index 271c435..ab25101 100644 --- a/lib/system/system.h +++ b/lib/system/system.h @@ -17,6 +17,15 @@ struct pb_system_apps { extern const struct pb_system_apps pb_system_apps; +enum tftp_type { + TFTP_TYPE_BUSYBOX, + TFTP_TYPE_HPA, + TFTP_TYPE_UNKNOWN, + TFTP_TYPE_BROKEN, +}; + +extern enum tftp_type tftp_type; + int pb_run_cmd(const char *const *cmd_argv, int wait, int dry_run); int pb_mkdir_recursive(const char *dir); int pb_rmdir_recursive(const char *base, const char *dir); -- cgit v1.1