Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2019-07-20 23:21:43 +0300
committerKen Brown <kbrown@cornell.edu>2019-07-21 01:25:18 +0300
commit24b695a447e539f0ba4ed2d0ce594dfdc0186c1e (patch)
treeb63906d0a3fb9395b60e6ede5c89047d31bff3b4
parent669dbc99962bb565f936ab36bba0101097f9794b (diff)
Cygwin: remove path_conv::is_auto_device()
It is used only once, and the name is supposed to suggest "device that is not based on the filesystem". This intended meaning is clearer if we just replace is_auto_device() by its definition at the place where it's used.
-rw-r--r--winsup/cygwin/path.cc2
-rw-r--r--winsup/cygwin/path.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 158f1e5fb..ed58e966f 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1921,7 +1921,7 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice)
win32_newpath.get_nt_native_path (), wsym_type);
if ((!isdevice && win32_newpath.exists ())
- || win32_newpath.is_auto_device ())
+ || (win32_newpath.isdevice () && !win32_newpath.is_fs_special ()))
{
set_errno (EEXIST);
__leave;
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 0c94c6152..d1be1dba0 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -183,7 +183,6 @@ class path_conv
int isfifo () const {return dev.is_device (FH_FIFO);}
int isspecial () const {return dev.not_device (FH_FS);}
int iscygdrive () const {return dev.is_device (FH_CYGDRIVE);}
- int is_auto_device () const {return isdevice () && !is_fs_special ();}
int is_fs_device () const {return isdevice () && is_fs_special ();}
int is_fs_special () const {return dev.is_fs_special ();}
int is_lnk_special () const {return is_fs_device () || isfifo () || is_lnk_symlink ();}