diff options
author | wtc%netscape.com <devnull@localhost> | 2002-06-22 14:39:43 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-06-22 14:39:43 +0000 |
commit | 50b4dae2ad25a779ccbe503f05647835538ef6c2 (patch) | |
tree | cfdba90880e6549179fb2aed9218b43e5d69a8f1 | |
parent | 9a324a802b76491f6b1a774192278b4d57e30df0 (diff) | |
download | nspr-hg-50b4dae2ad25a779ccbe503f05647835538ef6c2.tar.gz |
Bug 150157: DosWrite is not returning an error when the disk is full.
We can tell the write failed if we did a partial write. The patch is
contributed by Michael Kaply <mkaply@us.ibm.com>.
-rw-r--r-- | pr/src/md/os2/os2io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pr/src/md/os2/os2io.c b/pr/src/md/os2/os2io.c index 12e2f2a2..acccf6a6 100644 --- a/pr/src/md/os2/os2io.c +++ b/pr/src/md/os2/os2io.c @@ -253,6 +253,12 @@ _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len) return -1; } + if (len != bytes) { + rv = ERROR_DISK_FULL; + _PR_MD_MAP_WRITE_ERROR(rv); + return -1; + } + return bytes; } /* --- end _PR_MD_WRITE() --- */ |