OSDN Git Service

* fhandler.h (struct part_t): New type.
authorcorinna <corinna>
Wed, 12 Jan 2011 09:16:49 +0000 (09:16 +0000)
committercorinna <corinna>
Wed, 12 Jan 2011 09:16:49 +0000 (09:16 +0000)
commit1f5d609de632d1e6a32fedc959ae6da2694bf01c
tree28d7f92e894020708ec9cc4131d55c43c0637088
parentd0bcd9fa0d127a63ed281a1b88988192db6a17bf
* fhandler.h (struct part_t): New type.
(class fhandler_dev_floppy): Convert partitions to part_t pointer.
Add lock_partition method.
* fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
to implement ondemand partition locking.
(fhandler_dev_floppy::write_file): Call lock_partition from here if
writing failed due to a potential write restriction on a disk
partition.
(fhandler_dev_floppy::open): Don't lock partitions here.
(fhandler_dev_floppy::close): Keep track of partition handle reference
count.  Close handles and remove partitions pointer ony if count is 0.
(fhandler_dev_floppy::dup): Just copy partitions pointer and increment
reference count.
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_floppy.cc