diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-08-27 09:08:32 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-08-27 09:08:32 +0000 |
commit | 1165007539a2db492adc4aded73e081edb99be1e (patch) | |
tree | a0b82865cdc589d7563b6d34e98cb34f4bf53169 /winsup/cygwin/fhandler_proc.cc | |
parent | 708bbfd08e3af41be76e864e822fe5cc638f5715 (diff) | |
download | cygnal-1165007539a2db492adc4aded73e081edb99be1e.tar.gz cygnal-1165007539a2db492adc4aded73e081edb99be1e.tar.bz2 cygnal-1165007539a2db492adc4aded73e081edb99be1e.zip |
* fhandler_proc.cc (format_proc_partitions): Improve comment.
Diffstat (limited to 'winsup/cygwin/fhandler_proc.cc')
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 9 |
1 files changed, 7 insertions, 2 deletions
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); |