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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dňa 1.2.2012 23:09, Eric Blake  wrote / napísal(a):
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.


Oh, yeah, you are right. And you managed to point it out literally seconds before pushing :D.

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]