On Fri, Mar 01, 2019 at 12:36:08PM +0800, Hangbin Liu wrote:
> Cause there is a genl_open() in get_team_active_iface().

...

> Oh, I got what you mean. OK, how about just close the fd directly in
> get_team_active_iface() since we didn't use rtnl_buf there. Then I
> can move this check back.

You want to re-factor rtnl_open() to pass different family types.
That is okay with me.

You added fd = nl_open(familiy), so why not make it symmetric?

static int nl_close(fd)
{
        return close(fd);
}

Then let rtnl_open call nl_open, and rtnl_close calls nl_close.

Thanks,
Richard

PS: Please keep the functions in alphabetical order, ie nl_ goes
    before rntl_ in the file.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to