New version of the patch for VLAN support.
The changes corresponds to comments from Patrik.
> We haven't been using Signed-off-by in commit messages as there is no
> maintainer hierarchy in the project. So you can omit this, I'd be
> scraping it off from the commit messge anyway.
>
> Please mention Justin Maggard, the patches for this part are virtually
> identical.
I'm a damaged kernel developer..
Of course, I was a little bit stressed, sorry Justin.
> > +static int connman_inet_get_vlan_vid(const char *ifname)
>
> This function is in plugins/ethernet.c, so it should not start with
> connman_inet_. A static function named for example get_vlan_vid() is
> good enough.
>
Indeed.
> > +{
> > + struct vlan_ioctl_args vifr;
> > + int vid;
> > + int sk;
> > +
> > + memset(&vifr, '\0', sizeof(vifr));
>
> Nitpick: a 0 does as well as the '\0'.
>
Agree.
> > + vifr.cmd = GET_VLAN_VID_CMD;
> > + strncpy(vifr.device1, ifname, sizeof(vifr.device1));
> > + vid = ioctl(sk, SIOCSIFVLAN, &vifr) ? -errno : vifr.u.VID;
>
> Nitpick: might be easier to read if written using an explicit 'if'
> statement.
>
Ok.
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman