mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
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
This commit is contained in:
parent
836aa5b77e
commit
999422d707
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7945
@ -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++;
|
||||
|
@ -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++;
|
||||
|
30
sys/isa/fd.c
30
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++;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)malloc.h 8.3 (Berkeley) 1/12/94
|
||||
* $Id: malloc.h,v 1.6 1995/02/02 08:49:45 davidg Exp $
|
||||
* $Id: malloc.h,v 1.7 1995/03/12 13:25:01 ugen Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_MALLOC_H_
|
||||
@ -111,6 +111,10 @@
|
||||
#define M_MSDOSFSMNT 59 /* MSDOSFS mount structure */
|
||||
#define M_MSDOSFSNODE 60 /* MSDOSFS vnode private part */
|
||||
#define M_MSDOSFSFAT 61 /* MSDOSFS file allocation table */
|
||||
#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 */
|
||||
#define M_TEMP 74 /* misc temporary data buffers */
|
||||
#define M_TTYS 75 /* tty data structures */
|
||||
#define M_GZIP 76 /* Gzip trees */
|
||||
@ -181,7 +185,11 @@
|
||||
"MSDOSFS mount",/* 59 M_MSDOSFSMNT */ \
|
||||
"MSDOSFS node", /* 60 M_MSDOSFSNODE */ \
|
||||
"MSDOSFS FAT", /* 61 M_MSDOSFSFAR */ \
|
||||
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, \
|
||||
NULL, NULL, NULL, NULL, NULL, \
|
||||
NULL, NULL, \
|
||||
"temp", /* 74 M_TEMP */ \
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)mount.h 8.13 (Berkeley) 3/27/94
|
||||
* $Id: mount.h,v 1.15 1995/03/16 20:23:48 wollman Exp $
|
||||
* $Id: mount.h,v 1.16 1995/04/10 18:52:40 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_MOUNT_H_
|
||||
@ -97,7 +97,8 @@ struct statfs {
|
||||
#define MOUNT_AFS 13 /* Andrew Filesystem */
|
||||
#define MOUNT_CD9660 14 /* ISO9660 (aka CDROM) Filesystem */
|
||||
#define MOUNT_UNION 15 /* Union (translucent) Filesystem */
|
||||
#define MOUNT_MAXTYPE 15
|
||||
#define MOUNT_DEVFS 16 /* existing device Filesystem */
|
||||
#define MOUNT_MAXTYPE 16
|
||||
|
||||
#define INITMOUNTNAMES { \
|
||||
"none", /* 0 MOUNT_NONE */ \
|
||||
@ -116,6 +117,7 @@ struct statfs {
|
||||
"afs", /* 13 MOUNT_AFS */ \
|
||||
"cd9660", /* 14 MOUNT_CD9660 */ \
|
||||
"union", /* 15 MOUNT_UNION */ \
|
||||
"devfs", /* 15 MOUNT_DEVFS */ \
|
||||
0, /* 16 MOUNT_SPARE */ \
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vnode.h 8.7 (Berkeley) 2/4/94
|
||||
* $Id: vnode.h,v 1.18 1995/03/29 05:09:44 davidg Exp $
|
||||
* $Id: vnode.h,v 1.19 1995/04/09 06:03:33 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_VNODE_H_
|
||||
@ -58,7 +58,7 @@ enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD };
|
||||
enum vtagtype {
|
||||
VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_PC, VT_LFS, VT_LOFS, VT_FDESC,
|
||||
VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS,
|
||||
VT_UNION, VT_MSDOSFS
|
||||
VT_UNION, VT_MSDOSFS, VT_DEVFS
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user