Re: [PATCH 2/2] Try stdin for input when no file is specified

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

 



Changes made, will submit an updated patchset after finalizing the rest
of this patch.

On 6/13/11 11:06 PM, Eric Blake wrote:
> I'm debating whether this line belongs here, or whether it belongs
> better in virsh.c.  That is, I don't know whether this is a
> virsh-specific feature, or whether all of the libvirt library should
> behave like this.

This very well could be only be needed in virsh, it just seemed like
util/util.c was where it could have the least duplication of code.

> I'm not even sure if stdin being a tty is the right check.

isatty() produces the correct behavior in all cases but the first one
you mentioned, ie running "virsh define", which will not wait for input
with the patch as it is.

I see the ctl->imode parameter used in main() to determine the
interactivity of the session, though that is only accessible at the
cmdOPERATION level, not in virFileReadAll().  Maybe (yet) another read
wrapper local to virsh.c that would check the ctl->imode if no path is
offered, and make a decision from there.

Thoughts?

-- 
~Michael Williams

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