public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: fhandler_*: remove isdevice() and is_auto_device()
@ 2019-07-22 12:18 Ken Brown
0 siblings, 0 replies; only message in thread
From: Ken Brown @ 2019-07-22 12:18 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4beb9da11875b6597629330a344ac679f990ca24
commit 4beb9da11875b6597629330a344ac679f990ca24
Author: Ken Brown <kbrown@cornell.edu>
Date: Fri Jul 19 15:39:35 2019 -0400
Cygwin: fhandler_*: remove isdevice() and is_auto_device()
isdevice() is used only in the definition of is_auto_device(). And
the latter is used only once, in a context where isdevice() always
returns true.
Diff:
---
winsup/cygwin/fhandler.h | 3 ---
winsup/cygwin/fhandler_raw.cc | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 7e59d84..e28ec81 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -414,7 +414,6 @@ public:
virtual bool is_tty () const { return false; }
virtual bool ispipe () const { return false; }
virtual pid_t get_popen_pid () const {return 0;}
- virtual bool isdevice () const { return true; }
virtual bool isfifo () const { return false; }
virtual int ptsname_r (char *, size_t);
virtual class fhandler_socket *is_socket () { return NULL; }
@@ -459,7 +458,6 @@ public:
virtual void seekdir (DIR *, long);
virtual void rewinddir (DIR *);
virtual int closedir (DIR *);
- bool is_auto_device () {return isdevice () && !dev ().isfs ();}
bool is_fs_special () {return pc.is_fs_special ();}
bool issymlink () {return pc.issymlink ();}
bool __reg2 device_access_denied (int);
@@ -1527,7 +1525,6 @@ class fhandler_disk_file: public fhandler_base
int dup (fhandler_base *child, int);
void fixup_after_fork (HANDLE parent);
int mand_lock (int, struct flock *);
- bool isdevice () const { return false; }
int __reg2 fstat (struct stat *buf);
int __reg1 fchmod (mode_t mode);
int __reg2 fchown (uid_t uid, gid_t gid);
diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc
index bd47b60..7c341d8 100644
--- a/winsup/cygwin/fhandler_raw.cc
+++ b/winsup/cygwin/fhandler_raw.cc
@@ -38,7 +38,7 @@ fhandler_dev_raw::fstat (struct stat *buf)
debug_printf ("here");
fhandler_base::fstat (buf);
- if (is_auto_device ())
+ if (!dev ().isfs ())
{
if (get_major () == DEV_TAPE_MAJOR)
buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-22 12:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 12:18 [newlib-cygwin] Cygwin: fhandler_*: remove isdevice() and is_auto_device() Ken Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).