summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/devices.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/devices.h')
-rw-r--r--winsup/cygwin/devices.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h
index b21f8f6a0..c885fb09d 100644
--- a/winsup/cygwin/devices.h
+++ b/winsup/cygwin/devices.h
@@ -14,8 +14,8 @@ typedef mode_t _mode_t;
typedef __dev32_t _dev_t;
#define FHDEV(maj, min) ((((unsigned) (maj)) << (sizeof (_major_t) * 8)) | (unsigned) (min))
-#define _minor(dev) ((dev) & ((1 << (sizeof (_minor_t) * 8)) - 1))
-#define _major(dev) ((dev) >> (sizeof (_major_t) * 8))
+#define _minor(dev) (((_minor_t) dev) & ((1 << (sizeof (_minor_t) * 8)) - 1))
+#define _major(dev) (((_major_t) dev) >> (sizeof (_major_t) * 8))
enum fh_devices
{
@@ -149,6 +149,7 @@ struct device
inline operator int () const {return devn;}
inline void setfs (bool x) {dev_on_fs = x;}
inline bool isfs () const {return dev_on_fs || devn == FH_FS;}
+ inline bool is_fs_special () const {return dev_on_fs && devn != FH_FS;}
};
extern const device *console_dev;