[libvirt] [PATCHv3 3/4] virsh: Add support for modifying domain description and titles

Eric Blake eblake at redhat.com
Wed Feb 1 22:09:23 UTC 2012


On 02/01/2012 09:49 AM, Eric Blake wrote:
> On 02/01/2012 06:03 AM, Peter Krempa wrote:
>> This patch adds a new command "desc" to show and modify titles and
>> description for the domains using the new API.
>>
>> +        /* strip a possible newline at the end of file */
>> +        /* some editors enforce a newline, this makes editing the title
>> +         * more convinient */
> 
> s/convinient/convenient/
> 
>> +        if (title &&
>> +            (tmpstr = strrchr(desc, '\n')) &&
>> +            *(tmpstr+1) == '\0')
>> +            *tmpstr = '\0';

Also, this hunk should be moved up to just after editing the file
finishes, since otherwise, our shortcut of comparing the editor results
with the input string might needlessly differ by the added newline.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list