Subject: bin/6883: scsictl/atactl buglet
To: None <gnats-bugs@gnats.netbsd.org>
From: Soren S. Jorvang <soren@t.dk>
List: netbsd-bugs
Date: 01/27/1999 01:49:22
>Number:         6883
>Category:       bin
>Synopsis:       scsictl/atactl buglet
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 26 16:50:01 1999
>Last-Modified:
>Originator:     Soren S. Jorvang
>Organization:
Soren
>Release:        NetBSD-current 19990127
>Environment:


>Description:
scsictl/atactl do not actually make use of the iscooked
opendisk(3) alternative when opening the device to use.

Also a few typos.


>How-To-Repeat:
$ ls -l /dev/scsibus0
crw-------  1 root  wheel  61, 0 Dec 28 11:19 /dev/scsibus0
$ scsictl scsibus0 reset
scsictl: scsibus0: No such file or directory


>Fix:
--- src/sbin/scsictl/scsictl.c.orig	Wed Jan 27 01:22:11 1999
+++ src/sbin/scsictl/scsictl.c	Wed Jan 27 01:40:31 1999
@@ -134,8 +134,8 @@
 			    sizeof(dvname_store), 1);
 			if (fd == -1)
 				err(1, "%s", dvname);
-		}
-		err(1, "%s", dvname);
+		} else
+			err(1, "%s", dvname);
 	}
 
 	/*
--- src/sbin/scsictl/scsi_sense.c.orig	Wed Jan 27 01:41:38 1999
+++ src/sbin/scsictl/scsi_sense.c	Wed Jan 27 01:42:33 1999
@@ -220,7 +220,7 @@
 { 0x3B, 0x0C, "Position Past Beginning Of Medium" },
 { 0x3B, 0x0D, "Medium Destination Element Full" },
 { 0x3B, 0x0E, "Medium Source Element Empty" },
-{ 0x3D, 0x00, "Invalid Bits In IDENTFY Message" },
+{ 0x3D, 0x00, "Invalid Bits In IDENTIFY Message" },
 { 0x3E, 0x00, "Logical Unit Has Not Self-Configured Yet" },
 { 0x3F, 0x00, "Target Operating Conditions Have Changed" },
 { 0x3F, 0x01, "Microcode Has Changed" },
--- src/sys/dev/scsipi/scsipi_verbose.c.orig	Wed Jan 27 01:42:13 1999
+++ src/sys/dev/scsipi/scsipi_verbose.c	Wed Jan 27 01:42:28 1999
@@ -216,7 +216,7 @@
 { 0x3B, 0x0C, "Position Past Beginning Of Medium" },
 { 0x3B, 0x0D, "Medium Destination Element Full" },
 { 0x3B, 0x0E, "Medium Source Element Empty" },
-{ 0x3D, 0x00, "Invalid Bits In IDENTFY Message" },
+{ 0x3D, 0x00, "Invalid Bits In IDENTIFY Message" },
 { 0x3E, 0x00, "Logical Unit Has Not Self-Configured Yet" },
 { 0x3F, 0x00, "Target Operating Conditions Have Changed" },
 { 0x3F, 0x01, "Microcode Has Changed" },
--- src/sbin/atactl/atactl.c.orig	Wed Jan 27 01:37:56 1999
+++ src/sbin/atactl/atactl.c	Wed Jan 27 01:40:01 1999
@@ -37,7 +37,7 @@
  */
 
 /*
- * wdctl(8) - a program to control wd (aka ATA) devices.
+ * atactl(8) - a program to control wd (aka ATA) devices.
  */
 
 #include <sys/param.h>
@@ -174,8 +174,8 @@
 			    sizeof(dvname_store), 1);
 			if (fd == -1)
 				err(1, "%s", dvname);
-		}
-		err(1, "%s", dvname);
+		} else
+			err(1, "%s", dvname);
 	}
 
 	/*
--- src/sbin/atactl/atactl.8.orig	Wed Jan 27 01:40:05 1999
+++ src/sbin/atactl/atactl.8	Wed Jan 27 01:40:13 1999
@@ -35,7 +35,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .Dd November 18, 1998
-.Dt WDCTL 8
+.Dt ATACTL 8
 .Os NetBSD
 .Sh NAME
 .Nm atactl
>Audit-Trail:
>Unformatted: