diff options
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | mpiosh/callback.c | 23 |
2 files changed, 22 insertions, 7 deletions
diff --git a/configure.in b/configure.in index 0b8d91e..1cfce46 100644 --- a/configure.in +++ b/configure.in @@ -53,12 +53,14 @@ AC_SUBST(MODULE_PATH) AC_SUBST(SPEC_PATH) KERNEL_INCLUDE= -if test -d "/usr/src/linux/include"; then - KERNEL_INCLUDE="/usr/src/linux/include" +if test -d "/lib/modules/${kernel_version}/build/include"; then + KERNEL_INCLUDE="/lib/modules/${kernel_version}/build/include" elif test -d "/usr/src/linux-2.4/include"; then KERNEL_INCLUDE="/usr/src/linux-2.4/include" elif test -d "/usr/include/linux"; then KERNEL_INCLUDE="/usr/include/linux" +elif test -d "/usr/src/linux/include"; then + KERNEL_INCLUDE="/usr/src/linux/include" fi if test -z ${KERNEL_INCLUDE}; then diff --git a/mpiosh/callback.c b/mpiosh/callback.c index a88bbc9..7d3596e 100644 --- a/mpiosh/callback.c +++ b/mpiosh/callback.c @@ -2,7 +2,7 @@ * * Author: Andreas Büsching <crunchy@tzi.de> * - * $Id: callback.c,v 1.32 2002/11/13 23:05:28 germeier Exp $ + * $Id: callback.c,v 1.33 2003/02/26 16:34:45 crunchy Exp $ * * Copyright (C) 2001 Andreas Büsching <crunchy@tzi.de> * @@ -865,10 +865,23 @@ mpiosh_cmd_ldir(char *args[]) pwd = getpwuid(st.st_uid); grp = getgrgid(st.st_gid); strftime(time, 12, "%b %2d", localtime(&(st.st_mtime))); - printf("%s %8s %8s %8d %10s %s\n", - rights, pwd->pw_name, grp->gr_name, (int)st.st_size, - time, - (*run)->d_name); + if (pwd && grp) { + printf("%s %8s %8s %8d %10s %s\n", + rights, pwd->pw_name, grp->gr_name, (int)st.st_size, + time, (*run)->d_name); + } else if (pwd) { + printf("%s %8s %8d %8d %10s %s\n", + rights, pwd->pw_name, st.st_gid, (int)st.st_size, + time, (*run)->d_name); + } else if (grp) { + printf("%s %8d %8s %8d %10s %s\n", + rights, st.st_uid, grp->gr_name, (int)st.st_size, + time, (*run)->d_name); + } else { + printf("%s %8d %8d %8d %10s %s\n", + rights, st.st_uid, st.st_gid, (int)st.st_size, + time, (*run)->d_name); + } } free(*run); } |