summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2001-05-14 20:20:11 +0000
committerjoerg <joerg@FreeBSD.org>2001-05-14 20:20:11 +0000
commitb9d6a2b68d9a434f4796d4daf1f8c24ec59cf639 (patch)
treeaf570829728671c90d42b7cb53ecb0edac4dfd00 /sys/alpha
parentcec00d25651e4ef292151b8418a07870db451943 (diff)
downloadFreeBSD-src-b9d6a2b68d9a434f4796d4daf1f8c24ec59cf639.zip
FreeBSD-src-b9d6a2b68d9a434f4796d4daf1f8c24ec59cf639.tar.gz
Implement a few more floppy ioctl commands and IO options, namely:
. FD_CLRERR clears the error counter, thus re-enables kernel error printf()s, . FD_GSTAT obtains the last FDC operation state, if any, . FDOPT_NOERRLOG (temporarily) turns off kernel printf() floppy error logging, . FDOPT_NOERROR makes the kernel ignore an FDC error, thus can enable the transfer of an erroneous sector to the user application All options are being cleared on (last) close. Prime consumer of the last features will be fdread(1), to be committed shortly. (FD_CLRERR should be wired into fdcontrol(8), but then fdcontrol(8) needs a major rewrite anyway.)
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/include/ioctl_fd.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/alpha/include/ioctl_fd.h b/sys/alpha/include/ioctl_fd.h
index dd6e9d0..95a6680 100644
--- a/sys/alpha/include/ioctl_fd.h
+++ b/sys/alpha/include/ioctl_fd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1992-1994 by Joerg Wunsch, Dresden
+ * Copyright (C) 1992-1994,2001 by Joerg Wunsch, Dresden
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -98,6 +98,10 @@ struct fd_type {
int f_inter; /* format interleave factor */
};
+struct fdc_status {
+ u_int status[7];
+};
+
#define FD_FORM _IOW('F', 61, struct fd_formb) /* format a track */
#define FD_GTYPE _IOR('F', 62, struct fd_type) /* get drive type */
#define FD_STYPE _IOW('F', 63, struct fd_type) /* set drive type */
@@ -107,7 +111,19 @@ struct fd_type {
#define FD_DEBUG _IOW('F', 66, int)
-#define FDOPT_NORETRY 0x0001 /* no retries on failure (cleared on close) */
+#define FD_CLRERR _IO('F', 67) /* clear error counter */
+
+/*
+ * Obtain NE765 status registers. Only successful if there is
+ * a valid status stored in fdc->status[].
+ */
+#define FD_GSTAT _IOR('F', 68, struct fdc_status)
+
+/* Options for FD_GOPTS/FD_SOPTS, cleared on device close */
+#define FDOPT_NORETRY 0x0001 /* no retries on failure */
+#define FDOPT_NOERRLOG 0x002 /* no "hard error" kernel log messages */
+#define FDOPT_NOERROR 0x0004 /* do not indicate errors, caller will use
+ FD_GSTAT in order to obtain status */
/*
* The following definitions duplicate those in sys/i386/isa/fdreg.h
OpenPOWER on IntegriCloud