Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/devctl/devctl.c
Show First 20 Lines • Show All 253 Lines • ▼ Show 20 Lines | set_driver(int ac, char **av) | ||||
if (ac != 2) | if (ac != 2) | ||||
set_driver_usage(); | set_driver_usage(); | ||||
if (devctl_set_driver(av[0], av[1], force) < 0) | if (devctl_set_driver(av[0], av[1], force) < 0) | ||||
err(1, "Failed to set %s driver to %s", av[0], av[1]); | err(1, "Failed to set %s driver to %s", av[0], av[1]); | ||||
return (0); | return (0); | ||||
} | } | ||||
DEVCTL_COMMAND(set, driver, set_driver); | DEVCTL_COMMAND(set, driver, set_driver); | ||||
static int | |||||
rescan(int ac, char **av) | |||||
{ | |||||
if (ac != 2) | |||||
usage(); | |||||
if (devctl_rescan(av[1]) < 0) | |||||
err(1, "Failed to rescan %s", av[1]); | |||||
return (0); | |||||
} | |||||
DEVCTL_COMMAND(top, rescan, rescan); | |||||
int | int | ||||
main(int ac, char *av[]) | main(int ac, char *av[]) | ||||
{ | { | ||||
struct devctl_command **cmd; | struct devctl_command **cmd; | ||||
if (ac == 1) | if (ac == 1) | ||||
usage(); | usage(); | ||||
ac--; | ac--; | ||||
Show All 13 Lines |