svn commit: r195200 - in head/usr.sbin: . wake
Stanislav Sedov
stas at FreeBSD.org
Tue Jun 30 21:45:37 UTC 2009
On Tue, 30 Jun 2009 18:51:23 +0000 (UTC)
Martin Blapp <mbr at FreeBSD.org> mentioned:
> Author: mbr
> Date: Tue Jun 30 18:51:22 2009
> New Revision: 195200
> URL: http://svn.freebsd.org/changeset/base/195200
>
> Log:
> Add wake, a tool to send Wake on LAN frames to hosts on a local Ethernet network
>
Cool! I always wanted something like this in base.
> +
> +WARNS?= 2
> +
> +.include <bsd.prog.mk>
>
What is the reason to use WARNS=2 here? Does it compile with higher warning
flags set? Could this warnings be fixed?
> + p = (u_char *)&pkt;
> + len = sizeof(pkt);
> + bw = 0;
> + while (len) {
> + if ((bw = write(bpf, &pkt, sizeof(pkt))) == -1)
> + return -1;
> + len -= bw;
> + p += bw;
> + }
> + return 0;
> +}
What the "p" pointer is used here for? I don't see any usage for it besides
incrementing it in the loop. Am I missing something?
Thanks!
--
Stanislav Sedov
ST4096-RIPE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20090630/72a0b546/attachment-0001.pgp
More information about the svn-src-head
mailing list