devctl.c (278320) | devctl.c (298707) |
---|---|
1/*- 2 * Copyright (c) 2014 John Baldwin <jhb@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2014 John Baldwin <jhb@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/usr.sbin/devctl/devctl.c 278320 2015-02-06 16:09:01Z jhb $"); | 28__FBSDID("$FreeBSD: head/usr.sbin/devctl/devctl.c 298707 2016-04-27 16:29:03Z jhb $"); |
29 30#include <sys/linker_set.h> 31#include <devctl.h> 32#include <err.h> 33#include <errno.h> 34#include <stdio.h> 35#include <stdlib.h> 36#include <string.h> --- 217 unchanged lines hidden (view full) --- 254 if (ac != 2) 255 set_driver_usage(); 256 if (devctl_set_driver(av[0], av[1], force) < 0) 257 err(1, "Failed to set %s driver to %s", av[0], av[1]); 258 return (0); 259} 260DEVCTL_COMMAND(set, driver, set_driver); 261 | 29 30#include <sys/linker_set.h> 31#include <devctl.h> 32#include <err.h> 33#include <errno.h> 34#include <stdio.h> 35#include <stdlib.h> 36#include <string.h> --- 217 unchanged lines hidden (view full) --- 254 if (ac != 2) 255 set_driver_usage(); 256 if (devctl_set_driver(av[0], av[1], force) < 0) 257 err(1, "Failed to set %s driver to %s", av[0], av[1]); 258 return (0); 259} 260DEVCTL_COMMAND(set, driver, set_driver); 261 |
262static int 263rescan(int ac, char **av) 264{ 265 266 if (ac != 2) 267 usage(); 268 if (devctl_rescan(av[1]) < 0) 269 err(1, "Failed to rescan %s", av[1]); 270 return (0); 271} 272DEVCTL_COMMAND(top, rescan, rescan); 273 |
|
262int 263main(int ac, char *av[]) 264{ 265 struct devctl_command **cmd; 266 267 if (ac == 1) 268 usage(); 269 ac--; --- 13 unchanged lines hidden --- | 274int 275main(int ac, char *av[]) 276{ 277 struct devctl_command **cmd; 278 279 if (ac == 1) 280 usage(); 281 ac--; --- 13 unchanged lines hidden --- |