This is the mail archive of the
cygwin-developers@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: raw device patch
- To: Corinna Vinschen <corinna@vinschen.de>
- Subject: Re: raw device patch
- From: Chris Faylor <cgf@cygnus.com>
- Date: Fri, 3 Sep 1999 18:30:17 -0400
- Cc: cygdev <cygwin-developers@sourceware.cygnus.com>, Vincent_Virgilio@nmss.com
- References: <37CFF473.ADBFFA13@vinschen.de>
I've applied this patch, or at least it's in my local repository.
As soon as our CVS server comes back up, I'll check it in.
*** Note to anybody else who has submitted a patch recently --
*** We haven't been *** ignoring you. DJ and I are very busy
*** right now, so if a patch *** requires any inspection it's
*** been put off for a while until we have time.
cgf
On Fri, Sep 03, 1999 at 06:16:51PM +0200, Corinna Vinschen wrote:
>
>Hi Chris, hi all!
>
>I have patched fhandler_raw.cc and fhandler_tape.cc because the
>S_ISCHR flag wasn't set correctly. This has produced the cpio
>problem that was reported in the cygwin mailing list by
>Vincent Virgilio <Vincent_Virgilio@nmss.com>
>
>Regards,
>Corinna
>
>
>ChangeLog:
>==========
>
>Fri Sep 3 18:15:00 1999 Corinna Vinschen <corinna@vinschen.de>
>
> * fhandler_raw.cc (fhandler_dev_raw::fstat): Added S_ISCHR
> to mode bits.
> * fhandler_tape.cc (fhandler_dev_tape::fstat): Erased setting
> of S_ISCHR because it's set in fhandler_dev_raw::fstat now.
>Index: fhandler_raw.cc
>===================================================================
>RCS file: /src/cvsroot/winsup-990818/fhandler_raw.cc,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 fhandler_raw.cc
>--- fhandler_raw.cc 1999/08/19 19:42:55 1.1.1.1
>+++ fhandler_raw.cc 1999/09/03 15:56:19
>@@ -128,9 +128,10 @@ fhandler_dev_raw::fstat (struct stat *bu
> }
>
> memset (buf, 0, sizeof *buf);
>- buf->st_mode = S_IRUSR | S_IWUSR |
>- S_IRGRP | S_IWGRP |
>- S_IROTH | S_IWOTH;
>+ buf->st_mode = S_IFCHR |
>+ S_IRUSR | S_IWUSR |
>+ S_IRGRP | S_IWGRP |
>+ S_IROTH | S_IWOTH;
> buf->st_nlink = 1;
> buf->st_blksize = devbuf ? devbufsiz : 1;
> buf->st_dev = buf->st_rdev = get_device () << 8 | (unit & 0xff);
>Index: fhandler_tape.cc
>===================================================================
>RCS file: /src/cvsroot/winsup-990818/fhandler_tape.cc,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 fhandler_tape.cc
>--- fhandler_tape.cc 1999/08/19 19:42:55 1.1.1.1
>+++ fhandler_tape.cc 1999/09/03 15:56:27
>@@ -158,8 +158,6 @@ fhandler_dev_tape::fstat (struct stat *b
> {
> struct mtget get;
>
>- buf->st_mode |= S_IFCHR;
>-
> if (! ioctl (MTIOCGET, &get))
> {
> buf->st_blocks = get.mt_capacity / buf->st_blksize;
>
>
--
cgf@cygnus.com
http://www.cygnus.com/