From d61925786a19f2ee513c969ad7cb421a7db762b7 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 27 Feb 2005 04:30:08 +0000 Subject: * sigproc.cc (_pinfo::set_ctty): Move function * pinfo.cc (_pinfo::set_ctty): to here. * fhandler_mem.cc (fhandler_dev_mem::fstat): Don't fill out structure if this is an on-disk device rather than an "auto" device. * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto. * path.cc (normalize_posix_path): Don't treat a standalone '//' as introducing a UNC path. (normalize_win32_path): Ditto. --- winsup/cygwin/fhandler_raw.cc | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'winsup/cygwin/fhandler_raw.cc') diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc index 4ce444c1b..e1ab19a07 100644 --- a/winsup/cygwin/fhandler_raw.cc +++ b/winsup/cygwin/fhandler_raw.cc @@ -86,17 +86,21 @@ fhandler_dev_raw::fstat (struct __stat64 *buf) { debug_printf ("here"); - if (get_major () == DEV_TAPE_MAJOR) - buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; - else - buf->st_mode = S_IFBLK | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; - - buf->st_uid = geteuid32 (); - buf->st_gid = getegid32 (); - buf->st_nlink = 1; - buf->st_blksize = S_BLKSIZE; - time_as_timestruc_t (&buf->st_ctim); - buf->st_atim = buf->st_mtim = buf->st_ctim; + fhandler_base::fstat (buf); + if (is_auto_device ()) + { + if (get_major () == DEV_TAPE_MAJOR) + buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; + else + buf->st_mode = S_IFBLK | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; + + buf->st_uid = geteuid32 (); + buf->st_gid = getegid32 (); + buf->st_nlink = 1; + buf->st_blksize = S_BLKSIZE; + time_as_timestruc_t (&buf->st_ctim); + buf->st_atim = buf->st_mtim = buf->st_ctim; + } return 0; } -- cgit v1.2.3