Date: Wed, 24 Jul 2002 03:05:14 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: hackers@freebsd.org Subject: odd idiom in <if>_attach functions Message-ID: <20020724030514.A7646@Odin.AC.HMC.Edu>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] I was poking around in various nic drivers and I noticed that several of them have what seems to be an odd idiom in their generic attach functions. For instance in sys/dev/ed/if_ed.c in ed_attach(), filling in the interface fields and attaching the interface is protected by and "if (!ifp->if_name)". Can someone explain why this is being done? It doesn't seem to make any sense that this could get called twice for the same device (after all you only attach once). -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9PnvZXY6L6fI4GtQRAqEtAJsE/6jVbQWvShv74vQkBRLY+tM7+ACgzZ1J gSy2MsvOEclQRp+F5l8eD90= =2wrs -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020724030514.A7646>
