* fhandler_proc.cc (format_proc_partitions): Improve comment.

This commit is contained in:
Corinna Vinschen 2010-08-27 09:08:32 +00:00
parent 708bbfd08e
commit 1165007539
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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);