Changeset View
Changeset View
Standalone View
Standalone View
stand/common/md.c
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
} md_image = { | } md_image = { | ||||
.start = "MFS Filesystem goes here", | .start = "MFS Filesystem goes here", | ||||
.end = "MFS Filesystem had better STOP here", | .end = "MFS Filesystem had better STOP here", | ||||
}; | }; | ||||
/* devsw I/F */ | /* devsw I/F */ | ||||
static int md_init(void); | static int md_init(void); | ||||
static int md_strategy(void *, int, daddr_t, size_t, char *, size_t *); | static int md_strategy(void *, int, daddr_t, size_t, char *, size_t *); | ||||
static int md_open(struct open_file *, ...); | static int md_open(struct open_file *); | ||||
static int md_close(struct open_file *); | static int md_close(struct open_file *); | ||||
static int md_print(int); | static int md_print(int); | ||||
struct devsw md_dev = { | struct devsw md_dev = { | ||||
.dv_name = "md", | .dv_name = "md", | ||||
.dv_type = DEVT_DISK, | .dv_type = DEVT_DISK, | ||||
.dv_init = md_init, | .dv_init = md_init, | ||||
.dv_strategy = md_strategy, | .dv_strategy = md_strategy, | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | case F_WRITE: | ||||
bcopy(buf, md_image.start + ofs, size); | bcopy(buf, md_image.start + ofs, size); | ||||
return (0); | return (0); | ||||
} | } | ||||
return (ENODEV); | return (ENODEV); | ||||
} | } | ||||
static int | static int | ||||
md_open(struct open_file *f, ...) | md_open(struct open_file *f) | ||||
tsoome: f is unused | |||||
{ | { | ||||
va_list ap; | |||||
struct devdesc *dev; | struct devdesc *dev; | ||||
va_start(ap, f); | dev = f->f_devdata; | ||||
dev = va_arg(ap, struct devdesc *); | |||||
va_end(ap); | |||||
if (dev->d_unit != 0) | if (dev->d_unit != 0) | ||||
return (ENXIO); | return (ENXIO); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
md_close(struct open_file *f) | md_close(struct open_file *f) | ||||
Show All 18 Lines |
f is unused