[newlib-cygwin] Cygwin: remove path_conv::is_auto_device()
Ken Brown
kbrown@sourceware.org
Mon Jul 22 12:18:00 GMT 2019
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=fb5ce26cfda0733d63ad7cde79c9e7c922aca57c
commit fb5ce26cfda0733d63ad7cde79c9e7c922aca57c
Author: Ken Brown <kbrown@cornell.edu>
Date: Sat Jul 20 16:21:43 2019 -0400
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.
Diff:
---
winsup/cygwin/path.cc | 2 +-
winsup/cygwin/path.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 8da858d..c13701a 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 69af5a0..0b4a003 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 ();}
More information about the Cygwin-cvs
mailing list