diff options
author | fjoe <fjoe@FreeBSD.org> | 2011-11-24 15:47:01 +0000 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2011-11-24 15:47:01 +0000 |
commit | 785264a30f01132975737fa8e81af24c6eb6bc33 (patch) | |
tree | f1f897508e11ba08deb50d9b7260a3ed443ed257 /usr.sbin/sade/devices.c | |
parent | 72a7edb085ebac224c61145a65bfe1a7a1de8ceb (diff) | |
download | FreeBSD-src-785264a30f01132975737fa8e81af24c6eb6bc33.zip FreeBSD-src-785264a30f01132975737fa8e81af24c6eb6bc33.tar.gz |
Disk selection dialog is now a normal menu, not a checkboxed menu:
checkboxed menu is confusing and also can not be implemented
in new libdialog.
Diffstat (limited to 'usr.sbin/sade/devices.c')
-rw-r--r-- | usr.sbin/sade/devices.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c index fec9bba..12581e4 100644 --- a/usr.sbin/sade/devices.c +++ b/usr.sbin/sade/devices.c @@ -122,7 +122,7 @@ deviceTry(struct _devname dev, char *try, int i) /* Register a new device in the devices array */ Device * -deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, +deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean (*init)(Device *), FILE * (*get)(Device *, char *, Boolean), void (*shutdown)(Device *), void *private) { @@ -135,7 +135,6 @@ deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean e newdev->description = desc; newdev->devname = devname; newdev->type = type; - newdev->enabled = enabled; newdev->init = init ? init : dummyInit; newdev->get = get ? get : dummyGet; newdev->shutdown = shutdown ? shutdown : dummyShutdown; @@ -223,7 +222,7 @@ deviceGetAll(void) continue; } - deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, + deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, dummyInit, dummyGet, dummyShutdown, d); if (isDebug()) msgDebug("Found a disk device named %s\n", names[i]); @@ -237,7 +236,7 @@ deviceGetAll(void) /* Got one! */ snprintf(devname, sizeof devname, "/dev/%s", c1->name); - dev = deviceRegister(c1->name, c1->name, strdup(devname), DEVICE_TYPE_DOS, TRUE, + dev = deviceRegister(c1->name, c1->name, strdup(devname), DEVICE_TYPE_DOS, mediaInitDOS, mediaGetDOS, mediaShutdownDOS, NULL); dev->private = c1; if (isDebug()) @@ -314,7 +313,7 @@ deviceCount(Device **devs) * menu is cloned. */ DMenu * -deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d), int (*check)(dialogMenuItem *d)) +deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d)) { Device **devs; int numdevs; @@ -338,7 +337,6 @@ deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d), i if (j == numDevs) tmp->items[i].title = "<unknown device type>"; tmp->items[i].fire = hook; - tmp->items[i].checked = check; } tmp->items[i].title = NULL; return tmp; |