[PATCH] net.c: fix a bug of -n

Jelmer Vernooij jelmer at samba.org
Tue Aug 6 20:18:13 MDT 2013


On Wed, Aug 07, 2013 at 10:15:38AM +0800, Peng Haitao wrote:
> On 08/07/2013 10:01 AM, Jelmer Vernooij wrote:
> >>  		{"port",	'p', POPT_ARG_INT,    &c->opt_port},
> >> -		{"myname",	'n', POPT_ARG_STRING, &c->opt_requester_name},
> >> +		{"netbiosname",	'n', POPT_ARG_STRING, &c->opt_requester_name},
> >>  		{"server",	'S', POPT_ARG_STRING, &c->opt_host},
> >>  		{"encrypt",	'e', POPT_ARG_NONE,   NULL, 'e', N_("Encrypt SMB transport (UNIX extended servers only)") },
> >>  		{"container",	'c', POPT_ARG_STRING, &c->opt_container},
> > Thanks for the patches.
> > 
> > I also think we should fix the docs in this case; they were probably
> > just copied over from the manpage for another utility.
> > 
> > If we want to rename this argument (it would be good for consistency)
> > then it should happen in a backwards-compatible manner that won't
> > break existing users of the current argument name.
> > 
> 
> Because other commands use "--netbiosname" as long argument of "-n".
> $ smbclient --help | grep netbiosname
>   -n, --netbiosname=NETBIOSNAME             Primary netbios name
> $ smbcacls --help | grep netbiosname
>   -n, --netbiosname=NETBIOSNAME          Primary netbios name
> 
> I think net should correspond with other commands.
> Thanks.
See my reply:

> > If we want to rename this argument (it would be good for consistency)
> > then it should happen in a backwards-compatible manner that won't
> > break existing users of the current argument name.

We can't simply change the name of the argument because it may break
humans and scripts that rely on the existing name.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130807/a11771fc/attachment.pgp>


More information about the samba-technical mailing list