This is the mail archive of the
mailing list for the Cygwin project.
1.7.5+: Bug in write() handling of 'disk full' condition? (XP)
- From: Catalin Patulea <cat at vv dot carleton dot ca>
- To: cygwin at cygwin dot com
- Date: Thu, 22 Jul 2010 17:42:50 -0400
- Subject: 1.7.5+: Bug in write() handling of 'disk full' condition? (XP)
I'm running a Windows XP SP3 with NTFS drives and woefully little disk
space.. I have ~200MB free on my D:\ drive. When I use write() with a
buffer larger than my available disk space, the return value is bogus
and sometimes larger than the buffer size I pass in (!). errno is not
set. I believe this is due to incorrect STATUS_DISK_FULL handling in
if (!NT_SUCCESS (status))
if (status == STATUS_DISK_FULL && io.Information > 0)
io.Information is only filled in if status is STATUS_SUCCESS. Here is
what the Wine project has to say on the topic:
See also the small utility in attachment, which uses NtWriteFile
directly and dumps status and io.Information out to the screen. Here
is what it does on my system with 200 MB available:
$ ./testwrite.exe 256
writing 256 MB...
status: c000007f (STATUS_DISK_FULL)
iosb.info looks a lot like the garbage values write() was returning.
I would be happy to submit a patch but I just wanted to get discussion
started on this topic first, especially since changes in this area of
the code are potentially very far-reaching.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple