delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/09/03/12:26:37

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <37CFF473.ADBFFA13@vinschen.de>
Date: Fri, 03 Sep 1999 18:16:51 +0200
From: Corinna Vinschen <corinna AT vinschen DOT de>
X-Mailer: Mozilla 4.6 [en] (WinNT; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: Chris Faylor <cgf AT cygnus DOT com>
CC: cygdev <cygwin-developers AT sourceware DOT cygnus DOT com>,
Vincent_Virgilio AT nmss DOT com
Subject: raw device patch

This is a multi-part message in MIME format.
--------------D1FBDFE5F175E0807A63EDD9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


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 AT nmss DOT com>

Regards,
Corinna


ChangeLog:
==========

Fri Sep 3 18:15:00 1999  Corinna Vinschen  <corinna AT vinschen DOT 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.
--------------D1FBDFE5F175E0807A63EDD9
Content-Type: text/plain; charset=us-ascii;
 name="raw-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="raw-patch"

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;



--------------D1FBDFE5F175E0807A63EDD9--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019