diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-01-29 16:34:34 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-01-29 16:34:34 +0300 |
commit | e86f8b7925d1da7b87d8235856cb757233546e36 (patch) | |
tree | 1ef6492de9a74b172984e0bd063bf0015b290f24 /winsup/cygwin/fhandler_process.cc | |
parent | faf07ace9256e17e846adcb514ee33d5ceccf1e7 (diff) |
* smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
handling.
* fhandler_process.cc (format_process_maps): Print major, minor and
inode numbers correctly.
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 4a14bca56..0115a4eb2 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -468,7 +468,13 @@ format_process_maps (_pinfo *p, char *destbuf, size_t maxsize) { char access[5]; strcpy (access, "r--p"); + struct __stat64 st; cygwin_conv_to_full_posix_path (modname, posix_modname); + if (stat64 (posix_modname, &st)) + { + st.st_dev = 0; + st.st_ino = 0; + } if (len + strlen (posix_modname) + 50 > maxsize - 1) break; if (workingset) @@ -485,14 +491,16 @@ format_process_maps (_pinfo *p, char *destbuf, size_t maxsize) } } int written = __small_sprintf (destbuf + len, - "%08lx-%08lx %s %08lx 00:00 %lu ", + "%08lx-%08lx %s %08lx %04x:%04x %U ", info.lpBaseOfDll, (unsigned long)info.lpBaseOfDll + info.SizeOfImage, access, info.EntryPoint, - info.SizeOfImage); - while (written++ < 49) + st.st_dev >> 16, + st.st_dev & 0xffff, + st.st_ino); + while (written++ < 61) destbuf[len + written] = ' '; len += written; len += __small_sprintf (destbuf + len, "%s\n", posix_modname); |