[PATCH] make function rtnl_link_set_name() more reasonable
Thomas Haller
thaller at redhat.com
Tue Jan 14 09:38:43 EST 2014
On Tue, 2014-01-07 at 13:02 +0000, Thomas Graf wrote:
> On 01/02/14 at 12:28am, Hongwei Bi wrote:
> > -extern void rtnl_link_set_name(struct rtnl_link *, const char *);
> > +extern int rtnl_link_set_name(struct rtnl_link *, const char *);
>
> Usually this would break ABI but changing void to int seems to be OK
> from an ABI and API stability perspective.
I would suggest not to change the behavior of the function. IMO
rtnl_link_set_name() should continue to set the name (and truncate if
necessary).
But we should add a return value to indicate the truncation. So, it will
work identical as before, and callers who care can detect the potential
error.
If you agree, could you please resubmit a patch and also adjust the code
comment for rtnl_link_set_name()?
Thank you,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140114/85f56b3d/attachment.sig>
More information about the libnl
mailing list