[Midnightbsd-cvs] src [10774] trunk/usr.sbin/fdread: tag

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jun 9 22:37:42 EDT 2018


Revision: 10774
          http://svnweb.midnightbsd.org/src/?rev=10774
Author:   laffer1
Date:     2018-06-09 22:37:41 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
tag

Modified Paths:
--------------
    trunk/usr.sbin/fdread/Makefile
    trunk/usr.sbin/fdread/fdread.1
    trunk/usr.sbin/fdread/fdread.c
    trunk/usr.sbin/fdread/fdutil.c
    trunk/usr.sbin/fdread/fdutil.h

Property Changed:
----------------
    trunk/usr.sbin/fdread/fdread.1

Modified: trunk/usr.sbin/fdread/Makefile
===================================================================
--- trunk/usr.sbin/fdread/Makefile	2018-06-10 02:37:18 UTC (rev 10773)
+++ trunk/usr.sbin/fdread/Makefile	2018-06-10 02:37:41 UTC (rev 10774)
@@ -1,10 +1,9 @@
-# $FreeBSD: src/usr.sbin/fdread/Makefile,v 1.5 2005/01/08 15:46:06 delphij Exp $
+# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/fdread/Makefile 201390 2010-01-02 11:07:44Z ed $
 
 PROG=	fdread
 SRCS=	fdread.c fdutil.c
 
-WARNS?=	6
-
 .if ${MACHINE} == "pc98"
 CFLAGS+= -DPC98
 .endif

Modified: trunk/usr.sbin/fdread/fdread.1
===================================================================
--- trunk/usr.sbin/fdread/fdread.1	2018-06-10 02:37:18 UTC (rev 10773)
+++ trunk/usr.sbin/fdread/fdread.1	2018-06-10 02:37:41 UTC (rev 10774)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\"
 .\" Copyright (c) 2001 Joerg Wunsch
 .\"
@@ -23,12 +24,12 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/usr.sbin/fdread/fdread.1,v 1.8 2005/02/13 22:25:28 ru Exp $
+.\" $FreeBSD: stable/10/usr.sbin/fdread/fdread.1 206622 2010-04-14 19:08:06Z uqs $
 .\"
 .\"
 .Dd May 14, 2001
+.Dt FDREAD 1
 .Os
-.Dt FDREAD 1
 .Sh NAME
 .Nm fdread
 .Nd read floppy disks


Property changes on: trunk/usr.sbin/fdread/fdread.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/fdread/fdread.c
===================================================================
--- trunk/usr.sbin/fdread/fdread.c	2018-06-10 02:37:18 UTC (rev 10773)
+++ trunk/usr.sbin/fdread/fdread.c	2018-06-10 02:37:41 UTC (rev 10774)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 2001 Joerg Wunsch
  *
@@ -23,7 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/usr.sbin/fdread/fdread.c,v 1.8 2006/07/20 09:38:46 stefanf Exp $
+ * $FreeBSD: stable/10/usr.sbin/fdread/fdread.c 227253 2011-11-06 19:01:54Z ed $
  */
 
 #include <sys/types.h>
@@ -44,14 +45,14 @@
 
 #include "fdutil.h"
 
-int	quiet, recover;
-unsigned char fillbyte = 0xf0;	/* "foo" */
+static int	quiet, recover;
+static unsigned char fillbyte = 0xf0;	/* "foo" */
 
-int	doread(int fd, FILE *of, const char *_devname);
-int	doreadid(int fd, unsigned int numids, unsigned int trackno);
-void	usage(void);
+static int	doread(int fd, FILE *of, const char *_devname);
+static int	doreadid(int fd, unsigned int numids, unsigned int trackno);
+static void	usage(void);
 
-void
+static void
 usage(void)
 {
 
@@ -149,13 +150,13 @@
 			err(EX_OSERR, "cannot create output file %s", fname);
 	}
 
-	if ((fd = open(_devname, O_RDWR)) == -1)
+	if ((fd = open(_devname, O_RDONLY)) == -1)
 		err(EX_OSERR, "cannot open device %s", _devname);
 
 	return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname));
 }
 
-int
+static int
 doread(int fd, FILE *of, const char *_devname)
 {
 	char *trackbuf;
@@ -166,9 +167,6 @@
 
 	if (ioctl(fd, FD_GTYPE, &fdt) == -1)
 		err(EX_OSERR, "ioctl(FD_GTYPE) failed -- not a floppy?");
-	fdopts = FDOPT_NOERRLOG;
-	if (ioctl(fd, FD_SOPTS, &fdopts) == -1)
-		err(EX_OSERR, "ioctl(FD_SOPTS, FDOPT_NOERRLOG)");
 
 	secsize = 128 << fdt.secsize;
 	tracksize = fdt.sectrac * secsize;
@@ -297,10 +295,10 @@
 	return (nerrs? EX_IOERR: EX_OK);
 }
 
-int
+static int
 doreadid(int fd, unsigned int numids, unsigned int trackno)
 {
-	int rv = 0, fdopts;
+	int rv = 0;
 	unsigned int i;
 	struct fdc_readid info;
 	struct fdc_status fdcs;
@@ -309,10 +307,6 @@
 	if (ioctl(fd, FD_GTYPE, &fdt) == -1)
 		err(EX_OSERR, "ioctl(FD_GTYPE) failed -- not a floppy?");
 
-	fdopts = FDOPT_NOERRLOG;
-	if (ioctl(fd, FD_SOPTS, &fdopts) == -1)
-		err(EX_OSERR, "ioctl(FD_SOPTS, FDOPT_NOERRLOG)");
-
 	for (i = 0; i < numids; i++) {
 		info.cyl = trackno / fdt.heads;
 		info.head = fdt.heads > 1? trackno % fdt.heads: 0;

Modified: trunk/usr.sbin/fdread/fdutil.c
===================================================================
--- trunk/usr.sbin/fdread/fdutil.c	2018-06-10 02:37:18 UTC (rev 10773)
+++ trunk/usr.sbin/fdread/fdutil.c	2018-06-10 02:37:41 UTC (rev 10774)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 2001 Joerg Wunsch
  *
@@ -23,7 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/usr.sbin/fdread/fdutil.c,v 1.8 2005/01/08 15:46:06 delphij Exp $
+ * $FreeBSD: stable/10/usr.sbin/fdread/fdutil.c 274024 2014-11-03 10:26:29Z nyan $
  */
 
 #include <dev/ic/nec765.h>
@@ -92,6 +93,7 @@
 
 
 static struct fd_type fd_types_288m[] = {
+#ifndef PC98
 #if 0
 	{ FDF_3_2880 },
 #endif
@@ -102,30 +104,18 @@
 	{ FDF_3_820 },
 	{ FDF_3_800 },
 	{ FDF_3_720 },
+#endif	/* !PC98 */
 	{ 0,0,0,0,0,0,0,0,0,0,0,0 }
 };
 
 static struct fd_type fd_types_144m[] = {
 #ifdef PC98
-#if 0
-	{ FDF_3_1722 },
-	{ FDF_3_1476 },
-#endif
 	{ FDF_3_1440 },
 	{ FDF_3_1200 },
-#if 0
-	{ FDF_3_820 },
-	{ FDF_3_800 },
-#endif
 	{ FDF_3_720 },
 	{ FDF_3_360 },
 	{ FDF_3_640 },
 	{ FDF_3_1230 },
-#if 0
-	{ FDF_3_1280 },
-	{ FDF_3_1480 },
-	{ FDF_3_1640 },
-#endif
 	{ 0,0,0,0,0,0,0,0,0,0,0,0 }
 #else
 	{ FDF_3_1722 },
@@ -142,17 +132,10 @@
 static struct fd_type fd_types_12m[] = {
 #ifdef PC98
 	{ FDF_5_1200 },
-#if 0
-	{ FDF_5_820 },
-	{ FDF_5_800 },
-#endif
 	{ FDF_5_720 },
 	{ FDF_5_360 },
 	{ FDF_5_640 },
 	{ FDF_5_1230 },
-#if 0
-	{ FDF_5_1280 },
-#endif
 	{ 0,0,0,0,0,0,0,0,0,0,0,0 }
 #else
 	{ FDF_5_1200 },
@@ -170,13 +153,17 @@
 
 static struct fd_type fd_types_720k[] =
 {
+#ifndef PC98
 	{ FDF_3_720 },
+#endif
 	{ 0,0,0,0,0,0,0,0,0,0,0,0 }
 };
 
 static struct fd_type fd_types_360k[] =
 {
+#ifndef PC98
 	{ FDF_5_360 },
+#endif
 	{ 0,0,0,0,0,0,0,0,0,0,0,0 }
 };
 

Modified: trunk/usr.sbin/fdread/fdutil.h
===================================================================
--- trunk/usr.sbin/fdread/fdutil.h	2018-06-10 02:37:18 UTC (rev 10773)
+++ trunk/usr.sbin/fdread/fdutil.h	2018-06-10 02:37:41 UTC (rev 10774)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 2001 Joerg Wunsch
  *
@@ -23,7 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/usr.sbin/fdread/fdutil.h,v 1.2 2001/12/15 19:09:04 joerg Exp $
+ * $FreeBSD: stable/10/usr.sbin/fdread/fdutil.h 87992 2001-12-15 19:09:04Z joerg $
  */
 
 



More information about the Midnightbsd-cvs mailing list