George David
2010-Jun-21 22:16 UTC
[syslinux] would like more detail when /tmp directory is missing. patch for linux/syslinux.c
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. Below is the output of diff -up Thanks! George --- linux/syslinux.c.orig 2010-06-21 15:04:49.000000000 -0600 +++ linux/syslinux.c 2010-06-21 15:58:05.000000000 -0600 @@ -421,7 +421,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)
Reasonably Related Threads
- compare st_mode & 07777, or Aix dirs always differ
- [PATCH] fuse: UID 0 should override all permissions checks (RHBZ#1106548).
- [PATCH v2] klibc-utils: add simple ls
- [PATCH] klibc-utils: add minils
- [RFC PATCH 01/19] tools/virtiofsd: add support for --socket-group