* syscalls.cc (truncate64): Don't second-guess errno if open fails.
This commit is contained in:
parent
ee58ee4a28
commit
576bfeeca8
|
@ -1,3 +1,7 @@
|
||||||
|
2004-12-01 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* syscalls.cc (truncate64): Don't second-guess errno if open fails.
|
||||||
|
|
||||||
2004-11-25 Christopher Faylor <cgf@timesys.com>
|
2004-11-25 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* environ.cc (putenv): Accommodate recent newlib change in argument to
|
* environ.cc (putenv): Accommodate recent newlib change in argument to
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -65,7 +65,7 @@ const device dev_bad_storage =
|
||||||
"/dev/kmem", FH_KMEM, "\\dev\\mem"
|
"/dev/kmem", FH_KMEM, "\\dev\\mem"
|
||||||
"/dev/clipboard", FH_CLIPBOARD, "\\dev\\clipboard"
|
"/dev/clipboard", FH_CLIPBOARD, "\\dev\\clipboard"
|
||||||
"/dev/port", FH_PORT, "\\dev\\port"
|
"/dev/port", FH_PORT, "\\dev\\port"
|
||||||
"/dev/com%(0-16)d", FHDEV(DEV_SERIAL_MAJOR, {$1}), "\\\\.\\com{$1}"
|
"/dev/com%(1-16)d", FHDEV(DEV_SERIAL_MAJOR, {$1}), "\\\\.\\com{$1}"
|
||||||
"/dev/ttyS%(0-15)d", FHDEV(DEV_SERIAL_MAJOR, {$1 + 1}), "\\\\.\\com{$1 + 1}"
|
"/dev/ttyS%(0-15)d", FHDEV(DEV_SERIAL_MAJOR, {$1 + 1}), "\\\\.\\com{$1 + 1}"
|
||||||
"/dev/pipe", FH_PIPE, "\\dev\\pipe"
|
"/dev/pipe", FH_PIPE, "\\dev\\pipe"
|
||||||
"/dev/fifo", FH_FIFO, "\\dev\\fifo"
|
"/dev/fifo", FH_FIFO, "\\dev\\fifo"
|
||||||
|
|
|
@ -1734,9 +1734,7 @@ truncate64 (const char *pathname, _off64_t length)
|
||||||
|
|
||||||
fd = open (pathname, O_RDWR);
|
fd = open (pathname, O_RDWR);
|
||||||
|
|
||||||
if (fd == -1)
|
if (fd != -1)
|
||||||
set_errno (EBADF);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
res = ftruncate64 (fd, length);
|
res = ftruncate64 (fd, length);
|
||||||
close (fd);
|
close (fd);
|
||||||
|
|
Loading…
Reference in New Issue