Changed minor number of /dev/zero from 6 to 5.
(Make sure to update your system accordingly or /dev/zero won't work.) Cleaned up comments in MEMORY driver.
This commit is contained in:
parent
b96c389e78
commit
c9ab8cce43
@ -61,7 +61,7 @@ do
|
|||||||
$e mknod kmem c 1 2; $e chmod 640 kmem
|
$e mknod kmem c 1 2; $e chmod 640 kmem
|
||||||
$e mknod null c 1 3; $e chmod 666 null
|
$e mknod null c 1 3; $e chmod 666 null
|
||||||
$e mknod boot b 1 4; $e chmod 600 ram
|
$e mknod boot b 1 4; $e chmod 600 ram
|
||||||
$e mknod zero c 1 6; $e chmod 644 zero
|
$e mknod zero c 1 5; $e chmod 644 zero
|
||||||
$e chgrp kmem ram mem kmem null boot zero
|
$e chgrp kmem ram mem kmem null boot zero
|
||||||
;;
|
;;
|
||||||
fd[0-3])
|
fd[0-3])
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
|
|
||||||
#define NR_DEVS 7 /* number of minor devices */
|
#define NR_DEVS 6 /* number of minor devices */
|
||||||
|
|
||||||
PRIVATE struct device m_geom[NR_DEVS]; /* base and size of each device */
|
PRIVATE struct device m_geom[NR_DEVS]; /* base and size of each device */
|
||||||
PRIVATE int m_seg[NR_DEVS]; /* segment index of each device */
|
PRIVATE int m_seg[NR_DEVS]; /* segment index of each device */
|
||||||
@ -72,8 +72,9 @@ PRIVATE char dev_zero[ZERO_BUF_SIZE];
|
|||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
PUBLIC void main(void)
|
PUBLIC void main(void)
|
||||||
{
|
{
|
||||||
m_init(); /* initialize the memory driver */
|
/* Main program. Initialize the memory driver and start the main loop. */
|
||||||
driver_task(&m_dtab); /* start driver's main loop */
|
m_init();
|
||||||
|
driver_task(&m_dtab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +96,6 @@ PRIVATE struct device *m_prepare(device)
|
|||||||
int device;
|
int device;
|
||||||
{
|
{
|
||||||
/* Prepare for I/O on a device: check if the minor device number is ok. */
|
/* Prepare for I/O on a device: check if the minor device number is ok. */
|
||||||
|
|
||||||
if (device < 0 || device >= NR_DEVS) return(NIL_DEV);
|
if (device < 0 || device >= NR_DEVS) return(NIL_DEV);
|
||||||
m_device = device;
|
m_device = device;
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ unsigned nr_req; /* length of request vector */
|
|||||||
if (opcode == DEV_GATHER) return(OK); /* always at EOF */
|
if (opcode == DEV_GATHER) return(OK); /* always at EOF */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Virtual copying. For boot device. */
|
/* Virtual copying. For RAM disk, kernel memory and boot device. */
|
||||||
case RAM_DEV:
|
case RAM_DEV:
|
||||||
case KMEM_DEV:
|
case KMEM_DEV:
|
||||||
case BOOT_DEV:
|
case BOOT_DEV:
|
||||||
|
@ -40,7 +40,7 @@ extern struct dmap {
|
|||||||
# define KMEM_DEV 2 /* minor device for /dev/kmem */
|
# define KMEM_DEV 2 /* minor device for /dev/kmem */
|
||||||
# define NULL_DEV 3 /* minor device for /dev/null */
|
# define NULL_DEV 3 /* minor device for /dev/null */
|
||||||
# define BOOT_DEV 4 /* minor device for /dev/boot */
|
# define BOOT_DEV 4 /* minor device for /dev/boot */
|
||||||
# define ZERO_DEV 6 /* minor device for /dev/zero */
|
# define ZERO_DEV 5 /* minor device for /dev/zero */
|
||||||
|
|
||||||
/* Full device numbers that are special to the boot monitor and FS. */
|
/* Full device numbers that are special to the boot monitor and FS. */
|
||||||
# define DEV_RAM 0x0100 /* device number of /dev/ram */
|
# define DEV_RAM 0x0100 /* device number of /dev/ram */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user