diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-02-02 22:42:06 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-02-02 22:42:06 +0000 |
commit | 3fd68a6a044e674d434353d5631aba2743e0bf89 (patch) | |
tree | 9f507acf3ea9c2c357cf233519a2d178dbf3b929 /winsup/cygwin/fhandler.cc | |
parent | 7823d9bb14798143e9791303186c7129336356dd (diff) | |
download | cygnal-3fd68a6a044e674d434353d5631aba2743e0bf89.tar.gz cygnal-3fd68a6a044e674d434353d5631aba2743e0bf89.tar.bz2 cygnal-3fd68a6a044e674d434353d5631aba2743e0bf89.zip |
* fhandler.h (fhandler_base::ftruncate): Define new virtual method.
(fhandler_disk_file::ftruncate): Ditto.
* fhandler.cc (fhandler_base::ftruncate): New method.
* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Ditto.
* syscalls.cc (ftruncate64): Move functionality into fhandlers.
Call fhandler method from here.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 5f60d0eb2..aa996ea56 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1,6 +1,7 @@ /* fhandler.cc. See console.cc for fhandler_console functions. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005 Red Hat, Inc. This file is part of Cygwin. @@ -814,8 +815,8 @@ fhandler_base::write (const void *ptr, size_t len) HANDLE h = get_output_handle (); BOOL r = DeviceIoControl (h, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &dw, NULL); - syscall_printf ("%d = DeviceIoControl(%p, FSCTL_SET_SPARSE, " - "NULL, 0, NULL, 0, &dw, NULL)", r, h); + syscall_printf ("%d = DeviceIoControl(%p, FSCTL_SET_SPARSE)", + r, h); } else if (wincap.has_lseek_bug ()) { @@ -1595,3 +1596,10 @@ fhandler_base::facl (int cmd, int nentries, __aclent32_t *aclbufp) } return res; } + +int +fhandler_base::ftruncate (_off64_t length) +{ + set_errno (EINVAL); + return -1; +} |