mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-18 23:12:15 +08:00
* devices.h (FH_CYGDRIVE): Define as DEV_VIRTFS_MAJOR class device.
(DEV_CYGDRIVE_MAJOR): Remove. (iscygdrive_dev): Define. * dtable.cc (fh_alloc): Accommodate above change. * path.cc (path_conv::check): Use iscygdrive_dev to check for cygdrive. * syscalls.cc (fhandler_base::set_ino_and_dev): Drop check for DEV_CYGDRIVE_MAJOR from conditional.
This commit is contained in:
parent
1f312200d3
commit
f7c8c4540a
@ -1,3 +1,13 @@
|
||||
2012-04-02 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* devices.h (FH_CYGDRIVE): Define as DEV_VIRTFS_MAJOR class device.
|
||||
(DEV_CYGDRIVE_MAJOR): Remove.
|
||||
(iscygdrive_dev): Define.
|
||||
* dtable.cc (fh_alloc): Accommodate above change.
|
||||
* path.cc (path_conv::check): Use iscygdrive_dev to check for cygdrive.
|
||||
* syscalls.cc (fhandler_base::set_ino_and_dev): Drop check for
|
||||
DEV_CYGDRIVE_MAJOR from conditional.
|
||||
|
||||
2012-04-02 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* devices.h (FH_DEV): Define as DEV_VIRTFS_MAJOR class device.
|
||||
|
@ -73,6 +73,7 @@ enum fh_devices
|
||||
FH_FS = FHDEV (DEV_VIRTFS_MAJOR, 195), /* filesystem based device */
|
||||
FH_NETDRIVE= FHDEV (DEV_VIRTFS_MAJOR, 194),
|
||||
FH_DEV = FHDEV (DEV_VIRTFS_MAJOR, 193),
|
||||
FH_CYGDRIVE= FHDEV (DEV_VIRTFS_MAJOR, 192),
|
||||
|
||||
DEV_FLOPPY_MAJOR = 2,
|
||||
FH_FLOPPY = FHDEV (DEV_FLOPPY_MAJOR, 0),
|
||||
@ -244,9 +245,6 @@ enum fh_devices
|
||||
DEV_SOUND_MAJOR = 14,
|
||||
FH_OSS_DSP = FHDEV (DEV_SOUND_MAJOR, 3),
|
||||
|
||||
DEV_CYGDRIVE_MAJOR = 98,
|
||||
FH_CYGDRIVE= FHDEV (DEV_CYGDRIVE_MAJOR, 0),
|
||||
|
||||
DEV_TCP_MAJOR = 30,
|
||||
FH_TCP = FHDEV (DEV_TCP_MAJOR, 36),
|
||||
FH_UDP = FHDEV (DEV_TCP_MAJOR, 39),
|
||||
@ -365,6 +363,8 @@ extern const device dev_fs_storage;
|
||||
#define isproc_dev(devn) \
|
||||
(devn >= FH_PROC_MIN_MINOR && devn <= FH_PROC_MAX_MINOR)
|
||||
|
||||
#define iscygdrive_dev(devn) (devn == FH_CYGDRIVE)
|
||||
|
||||
#define isdev_dev(devn) (devn == FH_DEV)
|
||||
|
||||
#define isprocsys_dev(devn) (devn == FH_PROCSYS)
|
||||
|
@ -456,9 +456,6 @@ fh_alloc (path_conv& pc)
|
||||
case DEV_PTYM_MAJOR:
|
||||
fh = cnew (fhandler_pty_master, pc.dev.get_minor ());
|
||||
break;
|
||||
case DEV_CYGDRIVE_MAJOR:
|
||||
fh = cnew (fhandler_cygdrive);
|
||||
break;
|
||||
case DEV_FLOPPY_MAJOR:
|
||||
case DEV_CDROM_MAJOR:
|
||||
case DEV_SD_MAJOR:
|
||||
@ -562,6 +559,9 @@ fh_alloc (path_conv& pc)
|
||||
case FH_DEV:
|
||||
fh = cnew (fhandler_dev);
|
||||
break;
|
||||
case FH_CYGDRIVE:
|
||||
fh = cnew (fhandler_cygdrive);
|
||||
break;
|
||||
case FH_TTY:
|
||||
if (!pc.isopen ())
|
||||
{
|
||||
|
@ -724,7 +724,7 @@ path_conv::check (const char *src, unsigned opt,
|
||||
return;
|
||||
}
|
||||
|
||||
if (dev.get_major () == DEV_CYGDRIVE_MAJOR)
|
||||
if (iscygdrive_dev (dev))
|
||||
{
|
||||
if (!component)
|
||||
fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
|
||||
|
@ -1612,8 +1612,7 @@ fhandler_base::set_ino_and_dev (struct __stat64 *buf)
|
||||
buf->st_dev = get_device ();
|
||||
}
|
||||
/* Only set st_rdev if it's a device. */
|
||||
if (!buf->st_rdev && get_major () != DEV_VIRTFS_MAJOR
|
||||
&& get_major () != DEV_CYGDRIVE_MAJOR)
|
||||
if (!buf->st_rdev && get_major () != DEV_VIRTFS_MAJOR)
|
||||
buf->st_rdev = get_device ();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user