ifclone.c (194799) | ifclone.c (288305) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. 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 --- 15 unchanged lines hidden (view full) --- 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#ifndef lint 31static const char rcsid[] = | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. 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 --- 15 unchanged lines hidden (view full) --- 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#ifndef lint 31static const char rcsid[] = |
32 "$FreeBSD: head/sbin/ifconfig/ifclone.c 194799 2009-06-23 23:49:52Z delphij $"; | 32 "$FreeBSD: head/sbin/ifconfig/ifclone.c 288305 2015-09-27 07:51:18Z ngie $"; |
33#endif /* not lint */ 34 | 33#endif /* not lint */ 34 |
35#include <sys/queue.h> 36#include <sys/types.h> | 35#include <sys/param.h> |
37#include <sys/ioctl.h> | 36#include <sys/ioctl.h> |
37#include <sys/queue.h> |
|
38#include <sys/socket.h> 39#include <net/if.h> 40 41#include <err.h> 42#include <stdio.h> 43#include <stdlib.h> 44#include <string.h> 45#include <unistd.h> --- 133 unchanged lines hidden (view full) --- 179 list_cloners(); 180 exit(0); 181} 182static struct option clone_Copt = { .opt = "C", .opt_usage = "[-C]", .cb = clone_Copt_cb }; 183 184static __constructor void 185clone_ctor(void) 186{ | 38#include <sys/socket.h> 39#include <net/if.h> 40 41#include <err.h> 42#include <stdio.h> 43#include <stdlib.h> 44#include <string.h> 45#include <unistd.h> --- 133 unchanged lines hidden (view full) --- 179 list_cloners(); 180 exit(0); 181} 182static struct option clone_Copt = { .opt = "C", .opt_usage = "[-C]", .cb = clone_Copt_cb }; 183 184static __constructor void 185clone_ctor(void) 186{ |
187#define N(a) (sizeof(a) / sizeof(a[0])) | |
188 size_t i; 189 | 187 size_t i; 188 |
190 for (i = 0; i < N(clone_cmds); i++) | 189 for (i = 0; i < nitems(clone_cmds); i++) |
191 cmd_register(&clone_cmds[i]); 192 opt_register(&clone_Copt); | 190 cmd_register(&clone_cmds[i]); 191 opt_register(&clone_Copt); |
193#undef N | |
194} | 192} |