[syslinux:master] mtools: slightly more obvious definition of tmpdir fallback
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Mon Jul 5 18:18:02 PDT 2010
Commit-ID: 553ce5ef0813222dba2afd220114d00ff5a20d47
Gitweb: http://syslinux.zytor.com/commit/553ce5ef0813222dba2afd220114d00ff5a20d47
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 5 Jul 2010 18:16:02 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 5 Jul 2010 18:16:02 -0700
mtools: slightly more obvious definition of tmpdir fallback
Make it a bit more obvious what actually happens for the tmpdir
fallback.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
mtools/syslinux.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/mtools/syslinux.c b/mtools/syslinux.c
index 761c31b..76cd2ca 100644
--- a/mtools/syslinux.c
+++ b/mtools/syslinux.c
@@ -198,16 +198,15 @@ int main(int argc, char *argv[])
* Temp directory of choice...
*/
tmpdir = getenv("TMPDIR");
+ if (!tmpdir) {
#ifdef P_tmpdir
- if (!tmpdir)
tmpdir = P_tmpdir;
-#endif
-#ifdef _PATH_TMP
- if (!tmpdir)
+#elif defined(_PATH_TMP)
tmpdir = _PATH_TMP;
-#endif
- if (!tmpdir)
+#else
tmpdir = "/tmp";
+#endif
+ }
/*
* First make sure we can open the device at all, and that we have
More information about the Syslinux-commits
mailing list