> And I just confirmed that if I print the context right before NtOpenFile(), 
> and just do
> the "continue",

But then I also tried this:  I removed the "continue" before "NtOpenFile()" and 
allowed it to proceed,
but I moved NtClose(devhdl) right after the "printf" statement (that we were 
tweaking), and
inserted the "continue" there, so it does not proceed with enumerating of the 
partitions.
And so again, I got the output that matches my disks without the duplication.  
So this actually
exonerates NtOpenFile() :-)

$ ./proc_partition
context = 282
major minor  #blocks  name   win-mounts

    8     0 500107608 sda (282, Harddisk0, 144)
context = 299
    8    16 1000204632 sdb (299, Harddisk1, 144)
context = 314
    8    32 1000204632 sdc (314, Harddisk2, 144)
context = 329
    8    48 1000204632 sdd (329, Harddisk3, 144)
context = 339
    8    64 234431064 sde (339, Harddisk4, 144)
context = 352
DeviceIoControl (Harddisk5\Partition0, IOCTL_DISK_GET_PARTITION_INFO{_EX}) 5    
8    80         0 sdf (352, Harddisk5, 144)

Anton Lavrentiev
Contractor NIH/NLM/NCBI


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to