summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1995-04-20 03:18:19 +0000
committerjulian <julian@FreeBSD.org>1995-04-20 03:18:19 +0000
commit266ce25fcbbdf2996fd32fc626b3cccf02ccff2f (patch)
treee7f4818ef7c815a901cb73a58287d1f8a9a2e504 /sys/isa
parent59f6d93fbd478a4e96d6b280a877eeb9d4e2b2a9 (diff)
downloadFreeBSD-src-266ce25fcbbdf2996fd32fc626b3cccf02ccff2f.zip
FreeBSD-src-266ce25fcbbdf2996fd32fc626b3cccf02ccff2f.tar.gz
Reviewed by: no-one yet, but non-intrusive
Submitted by: julian@tfs.com Obtained from: written from scratch slight changes to make space for devfs.. (also conditional test code in i386/isa/fd.c) =================================================================== RCS file: /home/ncvs/src/sys/sys/malloc.h,v retrieving revision 1.7 diff -r1.7 malloc.h 113a114,117 > #define M_DEVFSMNT 62 /* DEVFS mount structure */ > #define M_DEVFSBACK 63 /* DEVFS Back node */ > #define M_DEVFSFRONT 64 /* DEVFS Front node */ > #define M_DEVFSNODE 65 /* DEVFS node */ 184c188,192 < NULL, NULL, NULL, NULL, NULL, \ --- > "DEVFS mount", /* 62 M_DEVFSMNT */ \ > "DEVFS back", /* 63 M_DEVFSBACK */ \ > "DEVFS front", /* 64 M_DEVFSFRONT */ \ > "DEVFS node", /* 65 M_DEVFSNODE */ \ > NULL, \ Index: sys/mount.h =================================================================== RCS file: /home/ncvs/src/sys/sys/mount.h,v retrieving revision 1.16 diff -r1.16 mount.h 100c100,101 < #define MOUNT_MAXTYPE 15 --- > #define MOUNT_DEVFS 16 /* existing device Filesystem */ > #define MOUNT_MAXTYPE 16 118a120 > "devfs", /* 15 MOUNT_DEVFS */ \ Index: sys/vnode.h =================================================================== RCS file: /home/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.19 diff -r1.19 vnode.h 61c61 < VT_UNION, VT_MSDOSFS --- > VT_UNION, VT_MSDOSFS, VT_DEVFS
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/fd.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index e755f56..e573e83 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.56 1995/04/06 07:20:15 rgrimes Exp $
+ * $Id: fd.c,v 1.57 1995/04/12 20:47:41 wollman Exp $
*
*/
@@ -558,6 +558,10 @@ fdattach(struct isa_device *dev)
int fdsu, st0, st3, i, unithasfd;
struct isa_device *fdup;
int ic_type = 0;
+#ifdef DEVFS
+ char name[64];
+ caddr_t key;
+#endif /* DEVFS */
fdc->fdcu = fdcu;
fdc->flags |= FDC_ATTACHED;
@@ -702,37 +706,61 @@ fdattach(struct isa_device *dev)
fd->type = FD_1200;
kdc_fd[fdu].kdc_description =
"1.2MB (1200K) 5.25in floppy disk drive";
+#ifdef DEVFS
+ sprintf(name,"fd%d.1200",fdu);
+#endif /* DEVFS */
break;
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;
kdc_fd[fdu].kdc_description =
"1.44MB (1440K) 3.5in floppy disk drive";
+#ifdef DEVFS
+ sprintf(name,"fd%d.1440",fdu);
+#endif /* DEVFS */
break;
case RTCFDT_288M:
printf("2.88MB 3.5in - 1.44MB mode\n");
fd->type = FD_1440;
kdc_fd[fdu].kdc_description =
"2.88MB (2880K) 3.5in floppy disk drive in 1.44 mode";
+#ifdef DEVFS
+ sprintf(name,"fd%d.1440",fdu);
+#endif /* DEVFS */
break;
case RTCFDT_360K:
printf("360KB 5.25in\n");
fd->type = FD_360;
kdc_fd[fdu].kdc_description =
"360KB 5.25in floppy disk drive";
+#ifdef DEVFS
+ sprintf(name,"fd%d.360",fdu);
+#endif /* DEVFS */
break;
case RTCFDT_720K:
printf("720KB 3.5in\n");
fd->type = FD_720;
kdc_fd[fdu].kdc_description =
"720KB 3.5in floppy disk drive";
+#ifdef DEVFS
+ sprintf(name,"fd%d.720",fdu);
+#endif /* DEVFS */
break;
default:
printf("unknown\n");
fd->type = NO_TYPE;
+#ifdef DEVFS
+ sprintf(name,"fd%d.xxxx",fdu);
+#endif /* DEVFS */
break;
}
kdc_fd[fdu].kdc_state = DC_IDLE;
+#ifdef DEVFS
+ key = dev_add("/disks/rfloppy",name,(caddr_t)Fdopen,fdu * 8,
+ 0,0,0,0644);
+ key = dev_add("/disks/floppy",name,(caddr_t)Fdopen,fdu * 8,
+ 1,0,0,0644);
+#endif /* DEVFS */
if (dk_ndrive < DK_NDRIVE) {
sprintf(dk_names[dk_ndrive], "fd%d", fdu);
fd->dkunit = dk_ndrive++;
OpenPOWER on IntegriCloud