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:
authorCorinna Vinschen <corinna@vinschen.de>2012-04-02 15:45:56 +0400
committerCorinna Vinschen <corinna@vinschen.de>2012-04-02 15:45:56 +0400
commit1f312200d30c76f24e6bc56afa7d4786ea86b4d5 (patch)
treea482a91447d5105a3852ae60148d916078d16d13
parent949cc8b6403f04b82ab944e3884911513e31526c (diff)
* devices.h (FH_DEV): Define as DEV_VIRTFS_MAJOR class device.
(DEV_DEV_MAJOR): Remove. * dtable.cc (fh_alloc): Accommodate above change. * syscalls.cc (set_ino_and_dev): Drop check for DEV_DEV_MAJOR from conditional.
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/devices.h4
-rw-r--r--winsup/cygwin/dtable.cc6
-rw-r--r--winsup/cygwin/syscalls.cc2
4 files changed, 13 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 56fea6bcf..db35faf72 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,13 @@
2012-04-02 Corinna Vinschen <corinna@vinschen.de>
+ * devices.h (FH_DEV): Define as DEV_VIRTFS_MAJOR class device.
+ (DEV_DEV_MAJOR): Remove.
+ * dtable.cc (fh_alloc): Accommodate above change.
+ * syscalls.cc (set_ino_and_dev): Drop check for DEV_DEV_MAJOR from
+ conditional.
+
+2012-04-02 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler.h (fhandler_base::set_ino_and_dev): Declare.
* syscalls.cc (fhandler_base::set_ino_and_dev): New method to set
st_ino, st_dev, and st_rdev for devices in a single spot.
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h
index d78a2e08d..d059bec2b 100644
--- a/winsup/cygwin/devices.h
+++ b/winsup/cygwin/devices.h
@@ -72,6 +72,7 @@ enum fh_devices
FH_FIFO = FHDEV (DEV_VIRTFS_MAJOR, 196),
FH_FS = FHDEV (DEV_VIRTFS_MAJOR, 195), /* filesystem based device */
FH_NETDRIVE= FHDEV (DEV_VIRTFS_MAJOR, 194),
+ FH_DEV = FHDEV (DEV_VIRTFS_MAJOR, 193),
DEV_FLOPPY_MAJOR = 2,
FH_FLOPPY = FHDEV (DEV_FLOPPY_MAJOR, 0),
@@ -246,9 +247,6 @@ enum fh_devices
DEV_CYGDRIVE_MAJOR = 98,
FH_CYGDRIVE= FHDEV (DEV_CYGDRIVE_MAJOR, 0),
- DEV_DEV_MAJOR = 99,
- FH_DEV= FHDEV (DEV_DEV_MAJOR, 0),
-
DEV_TCP_MAJOR = 30,
FH_TCP = FHDEV (DEV_TCP_MAJOR, 36),
FH_UDP = FHDEV (DEV_TCP_MAJOR, 39),
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 2cc8229af..782bab17b 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -459,9 +459,6 @@ fh_alloc (path_conv& pc)
case DEV_CYGDRIVE_MAJOR:
fh = cnew (fhandler_cygdrive);
break;
- case DEV_DEV_MAJOR:
- fh = cnew (fhandler_dev);
- break;
case DEV_FLOPPY_MAJOR:
case DEV_CDROM_MAJOR:
case DEV_SD_MAJOR:
@@ -562,6 +559,9 @@ fh_alloc (path_conv& pc)
case FH_NETDRIVE:
fh = cnew (fhandler_netdrive);
break;
+ case FH_DEV:
+ fh = cnew (fhandler_dev);
+ break;
case FH_TTY:
if (!pc.isopen ())
{
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 2ef94dae6..73948107d 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1613,7 +1613,7 @@ fhandler_base::set_ino_and_dev (struct __stat64 *buf)
}
/* Only set st_rdev if it's a device. */
if (!buf->st_rdev && get_major () != DEV_VIRTFS_MAJOR
- && get_major () != DEV_CYGDRIVE_MAJOR && get_major () != DEV_DEV_MAJOR)
+ && get_major () != DEV_CYGDRIVE_MAJOR)
buf->st_rdev = get_device ();
}