diff --git a/stand/libofw/libofw.h b/stand/libofw/libofw.h --- a/stand/libofw/libofw.h +++ b/stand/libofw/libofw.h @@ -28,6 +28,8 @@ #include "openfirm.h" #include +#define DEVT_OFDISK 1001 + struct ofw_devdesc { struct devdesc dd; union { diff --git a/stand/libofw/ofw_disk.c b/stand/libofw/ofw_disk.c --- a/stand/libofw/ofw_disk.c +++ b/stand/libofw/ofw_disk.c @@ -49,10 +49,12 @@ static int ofwd_close(struct open_file *f); static int ofwd_ioctl(struct open_file *f, u_long cmd, void *data); static int ofwd_print(int verbose); +static char * ofwd_fmtdev(struct devdesc *); + struct devsw ofwdisk = { .dv_name = "block", - .dv_type = DEVT_DISK, + .dv_type = DEVT_OFDISK, .dv_init = ofwd_init, .dv_strategy = ofwd_strategy, .dv_open = ofwd_open, @@ -60,8 +62,7 @@ .dv_ioctl = ofwd_ioctl, .dv_print = ofwd_print, .dv_cleanup = nullsys, - .dv_fmtdev = disk_fmtdev, - .dv_parsedev = disk_parsedev, + .dv_fmtdev = ofwd_fmtdev, }; /* @@ -185,3 +186,10 @@ { return (0); } +static char * +ofwd_fmtdev(struct devdesc *idev) +{ + struct ofw_devdesc *dev = (struct ofw_devdesc *)idev; + + return (dev->d_path); +}