Deleted Added
full compact
ifmedia.c (281236) ifmedia.c (288305)
1/* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */
1/* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */
2/* $FreeBSD: head/sbin/ifconfig/ifmedia.c 281236 2015-04-07 21:31:17Z erj $ */
2/* $FreeBSD: head/sbin/ifconfig/ifmedia.c 288305 2015-09-27 07:51:18Z ngie $ */
3
4/*
5 * Copyright (c) 1997 Jason R. Thorpe.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 829 unchanged lines hidden (view full) ---

840 .af_name = "af_media",
841 .af_af = AF_UNSPEC,
842 .af_other_status = media_status,
843};
844
845static __constructor void
846ifmedia_ctor(void)
847{
3
4/*
5 * Copyright (c) 1997 Jason R. Thorpe.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 829 unchanged lines hidden (view full) ---

840 .af_name = "af_media",
841 .af_af = AF_UNSPEC,
842 .af_other_status = media_status,
843};
844
845static __constructor void
846ifmedia_ctor(void)
847{
848#define N(a) (sizeof(a) / sizeof(a[0]))
849 size_t i;
850
848 size_t i;
849
851 for (i = 0; i < N(media_cmds); i++)
850 for (i = 0; i < nitems(media_cmds); i++)
852 cmd_register(&media_cmds[i]);
853 af_register(&af_media);
851 cmd_register(&media_cmds[i]);
852 af_register(&af_media);
854#undef N
855}
853}