Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-08-27 13:08:32 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-08-27 13:08:32 +0400
commit1165007539a2db492adc4aded73e081edb99be1e (patch)
treea0b82865cdc589d7563b6d34e98cb34f4bf53169 /winsup/cygwin
parent708bbfd08e3af41be76e864e822fe5cc638f5715 (diff)
* fhandler_proc.cc (format_proc_partitions): Improve comment.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/fhandler_proc.cc9
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e78d2b4f6..e7043c0a4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_partitions): Improve comment.
+
2010-08-26 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_partitions): Simplify code and enable
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 817bfac0c..3289acb15 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -1098,8 +1098,13 @@ format_proc_partitions (void *, char *&destbuf)
|| !isdigit (devname[8]))
continue;
/* Construct path name for partitions, starting with 0, which is the
- whole disk, and try to open. Let's assume we never have more than
- 99 partitions per disk for now... */
+ whole disk, and try to open.
+ Note that the correct way to do this would be to open the HarddiskX
+ directory and enumerate the Partition entries. However, while the
+ partition entries itself are accessible for query by everyone, the
+ HarddiskX parent directory is only queryable by SYSTEM and Admins.
+ This way we circumvent this nonsensical restriction. Let's assume
+ we never have more than 99 partitions per disk for now... */
for (int part_num = 0; part_num < 99; ++part_num)
{
wcscpy (wpath, dbi->ObjectName.Buffer);