diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-06-20 23:58:26 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-06-20 23:58:26 +0400 |
commit | 74041a3a749d183b9c73fe550acbde630892d13c (patch) | |
tree | 1020db3a3ead09e90f14e06c8df057203be50eed /winsup/cygwin/fhandler_proc.cc | |
parent | 7b02cb30383f740a29c172f9765efa2460f3720a (diff) |
* fhandler_proc.cc (format_proc_partitions): Only list recognized
partitions. Use partition number given by PartitionNumber member.
Diffstat (limited to 'winsup/cygwin/fhandler_proc.cc')
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 9d395185c..ce9fbc180 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1009,10 +1009,11 @@ format_proc_partitions (char *destbuf, size_t maxsize) DRIVE_LAYOUT_INFORMATION *dli = (DRIVE_LAYOUT_INFORMATION *) buf; for (unsigned partition = 0; partition < dli->PartitionCount; partition++) { - if (!dli->PartitionEntry[partition].PartitionLength.QuadPart) + if (!dli->PartitionEntry[partition].PartitionLength.QuadPart + || !dli->PartitionEntry[partition].RecognizedPartition) continue; device dev; - dev.parsedisk (drive_number, partition + 1); + dev.parsedisk (drive_number, dli->PartitionEntry[partition].PartitionNumber); bufptr += __small_sprintf (bufptr, "%5d %5d %9U %s\n", dev.major, dev.minor, (long long)(dli->PartitionEntry[partition].PartitionLength.QuadPart >> 10), |