diff options
author | Christopher Faylor <me@cgf.cx> | 2001-10-02 01:58:06 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-10-02 01:58:06 +0000 |
commit | 4ab6034f50e5783151699f2c0b146f090980e183 (patch) | |
tree | 2c566fbf592daaff83e02ad049cad474442d0995 /winsup/cygwin/path.h | |
parent | 47af76d8c8e9979c5ddd42f17573b22b75a03117 (diff) | |
download | newlib-4ab6034f50e5783151699f2c0b146f090980e183.zip newlib-4ab6034f50e5783151699f2c0b146f090980e183.tar.gz newlib-4ab6034f50e5783151699f2c0b146f090980e183.tar.bz2 |
* dtable.h (dtable::build_fhandler): Make path_conv parameter non-optional.
(dtable::init_std_file_from_handle): Eliminate name parameter.
* dtable.cc (stdio_init): Don't pass bogus name to init_std_file_from_handle.
The function will figure out the name itself.
(dtable::init_std_file_from_handle): Eliminate name parameter. Assume that
we're always called with an appropriate fd. Pass name as NULL if we can't
simply figure it out from context.
(cygwin_attach_handle_to_fd): Pass path_conv argument to build_fhandler.
(dtable::build_fhandler): Make path_conv argument mandatory. Eliminate
specific call to get_device_number. With unknown device names, set name from
handle context for parsing by path_conv.
(dtable::build_fhandler): Pass path_conv argument to build_fhandler.
* path.h (path_conv::set_isdisk): Set disk device type.
(path_conv::is_device): Don't consider FH_DISK a "device".
* syscalls.cc (_open): Pass path_conv argument by reference.
(stat_worker): Ditto.
(_rename): Use path_conv operators. Add bounds to DeleteFile/MoveFile for
loop.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 17f5e2b..1052deb 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -104,7 +104,7 @@ class path_conv void set_binary () {path_flags |= PATH_BINARY;} void set_symlink () {path_flags |= PATH_SYMLINK;} void set_has_symlinks () {path_flags |= PATH_HAS_SYMLINKS;} - void set_isdisk () {path_flags |= PATH_ISDISK;} + void set_isdisk () {path_flags |= PATH_ISDISK; devn = FH_DISK;} void set_exec (int x = 1) {path_flags |= x ? PATH_EXEC : PATH_NOTEXEC;} void set_has_acls (int x = 1) {path_flags |= x ? PATH_HASACLS : PATH_NOTHING;} void set_has_buggy_open (int x = 1) {path_flags |= x ? PATH_HASBUGGYOPEN : PATH_NOTHING;} @@ -130,7 +130,7 @@ class path_conv operator char *() {return path; } operator DWORD &() {return fileattr; } operator int &() {return (int) fileattr; } - BOOL is_device () {return devn != FH_BAD;} + BOOL is_device () {return devn != FH_BAD && devn != FH_DISK;} DWORD get_devn () {return devn == FH_BAD ? (DWORD) FH_DISK : devn;} short get_unitn () {return devn == FH_BAD ? 0 : unit;} DWORD file_attributes () {return fileattr;} |