aboutsummaryrefslogtreecommitdiffstats
path: root/linux/syslinux.c
diff options
context:
space:
mode:
authorGeorge David <george@miamisalsa.com>2010-06-21 16:16:58 -0600
committerH. Peter Anvin <hpa@linux.intel.com>2010-06-21 15:48:29 -0700
commit316baa765d85a91cd89585ea5cf913bcd2e478a5 (patch)
tree23cde83416b58cb357a0b9f3df74a519c9e8f4d5 /linux/syslinux.c
parent2f712545dd82f5906ec930b643d44e8b12295682 (diff)
downloadsyslinux-316baa765d85a91cd89585ea5cf913bcd2e478a5.tar.gz
syslinux-316baa765d85a91cd89585ea5cf913bcd2e478a5.tar.xz
syslinux-316baa765d85a91cd89585ea5cf913bcd2e478a5.zip
linux installer: better error message for missing /tmp
Our linux distribution at my job didn't include a /tmp directory. When ever I tried to use syslinux, I would get the following error: ./syslinux: No such file or directory I modified the code to report this: ./syslinux: Cannot access the /tmp/ directory. This would have helped me a lot rather than having to download the source and run it through the debugger to figure out that my /tmp/ directory was missing. I suspect if this ever happens again I'll know exactly what was wrong, but hopefully it will help someone else.
Diffstat (limited to 'linux/syslinux.c')
-rw-r--r--linux/syslinux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/syslinux.c b/linux/syslinux.c
index 7152d2bc..fa500cf7 100644
--- a/linux/syslinux.c
+++ b/linux/syslinux.c
@@ -344,7 +344,8 @@ int main(int argc, char *argv[])
Make a temp dir and pass all the gunky options to mount. */
if (chdir(_PATH_TMP)) {
- perror(program);
+ fprintf(stderr, "%s: Cannot access the %s directory.\n",
+ program, _PATH_TMP);
exit(1);
}
#define TMP_MODE (S_IXUSR|S_IWUSR|S_IXGRP|S_IWGRP|S_IWOTH|S_IXOTH|S_ISVTX)