[libvirt] [PATCH] Use standard spacing for user/pass prompt

Eric Blake eblake at redhat.com
Wed Feb 24 22:06:27 UTC 2010


According to Cole Robinson on 2/24/2010 12:23 PM:
> Kind of minor, but it annoys me that the default auth callback
> doesn't put a space between the prompt and the input, like a typical
> terminal, ssh, etc. This patch changes the current prompt:
> 
> Please enter your authentication name:myuser
> 
> to
> 
> Please enter your authentication name: myuser

Agreed.

>          case VIR_CRED_REALM:
> -            if (printf("%s:", cred[i].prompt) < 0)
> +            if (printf("%s: ", cred[i].prompt) < 0)

ACK.

But unrelated to your patch, how does this work with i18n?  Obviously,
translating "%s: " is useless.  Is cred[i].prompt previously translated
somewhere earlier in the caller?  I ask, because I'm not sure whether all
locales are okay with ': ' as the prompt tail, and wonder whether it
should be inlined into the translated prompt, which in turn would simplify
this part to puts(cred[i].prompt).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 320 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100224/e72dcb91/attachment-0001.sig>


More information about the libvir-list mailing list