int bdwrite(bufptr bp) { uint16_t dev = bp->bf_dev; validchk(dev, PANIC_BDW); bdsetup(bp); return ((*dev_tab[major(dev)].dev_write) (minor(dev), 0, 0)); }
int bdread(bufptr bp) { uint16_t dev = bp->bf_dev; validchk(dev, PANIC_BDR); bdsetup(bp); return ((*dev_tab[major(dev)].dev_read) (minor(dev), 0, 0)); }
int d_close(uint16_t dev) { validchk(dev, PANIC_DCL); bdrop(dev); return (*dev_tab[major(dev)].dev_close) (minor(dev)); }
int cdwrite(uint16_t dev, uint8_t flag) { validchk(dev, PANIC_CDW); return ((*dev_tab[major(dev)].dev_write) (minor(dev), 1, flag)); }
int cdread(uint16_t dev, uint8_t flag) { validchk(dev, PANIC_CDR); return ((*dev_tab[major(dev)].dev_read) (minor(dev), 1, flag)); }