Re: [PATCH] virsh: Report an error when virGetUserDirectory fails

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

 



2011/5/16 Laine Stump <laine@xxxxxxxxx>:
> On 05/15/2011 01:31 AM, Matthias Bolte wrote:
>>
>> Otherwise virsh shows the interactive greeting and the silently exists
>> instead of enterting interactive mode.
>> ---
>> Âtools/virsh.c | Â Â4 +++-
>> Â1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/virsh.c b/tools/virsh.c
>> index 3baa015..356e0ae 100644
>> --- a/tools/virsh.c
>> +++ b/tools/virsh.c
>> @@ -12495,8 +12495,10 @@ vshReadlineInit(vshControl *ctl)
>> Â Â Â/* Prepare to read/write history from/to the ~/.virsh/history file */
>> Â Â Âuserdir = virGetUserDirectory(getuid());
>>
>> - Â Âif (userdir == NULL)
>> + Â Âif (userdir == NULL) {
>> + Â Â Â ÂvshError(ctl, "%s", _("Could not determine home directory"));
>> Â Â Â Â Âreturn -1;
>> + Â Â}
>>
>> Â Â Âif (virAsprintf(&ctl->historydir, "%s/.virsh", userdir)< Â0) {
>> Â Â Â Â ÂvshError(ctl, "%s", _("Out of memory"));
>
> ACK.
>

Thanks, I fixed two typos in the commit message and pushed the result.

Matthias

--
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]