OSDN Git Service

* fhandler.h (MAX_PARTITIONS): New definition.
authorcorinna <corinna>
Tue, 11 Jan 2011 14:50:43 +0000 (14:50 +0000)
committercorinna <corinna>
Tue, 11 Jan 2011 14:50:43 +0000 (14:50 +0000)
commit8919cdf118a8cd0e3c53d6e00216f30a288e9d2b
treef9aed030f0ef2bfe84798115030c13f3ed8b6e88
parente4b5ffb186af4e246db726704b591bf3f5b96642
* fhandler.h (MAX_PARTITIONS): New definition.
(class fhandler_dev_floppy): Add partitions array member.  Add close
method.
* fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
out partitions array.
(fhandler_dev_floppy::open): Fix "entire disk" condition for call to
DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
on all affected disk partitions starting with Vista.
(fhandler_dev_floppy::close): New method.
(fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
* wincap.h (wincaps::has_restricted_raw_disk_access): New element.
* wincap.cc: Implement above element throughout.
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_floppy.cc
winsup/cygwin/wincap.cc
winsup/cygwin/wincap.h