[libvirt] [PATCH] virsh: support multifunction in attach-disk

KAMEZAWA Hiroyuki kamezawa.hiroyu at jp.fujitsu.com
Wed Dec 14 00:18:59 UTC 2011


On Tue, 13 Dec 2011 16:14:18 -0700
Eric Blake <eblake at redhat.com> wrote:

> On 12/12/2011 11:12 PM, KAMEZAWA Hiroyuki wrote:
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>
> > 
> > PCI <address...> can be specified by attach-disk but multifunction cannot
> > be specified. add --multifunction support.
> > ---
> >  tools/virsh.c   |    7 ++++++-
> >  tools/virsh.pod |    3 ++-
> >  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> ACK and pushed.
> 
Thank you.

> > 
> > diff --git a/tools/virsh.c b/tools/virsh.c
> > index d58b827..346b440 100644
> > --- a/tools/virsh.c
> > +++ b/tools/virsh.c
> > @@ -12661,6 +12661,7 @@ static const vshCmdOptDef opts_attach_disk[] = {
> >      {"serial", VSH_OT_STRING, 0, N_("serial of disk device")},
> >      {"shareable", VSH_OT_BOOL, 0, N_("shareable between domains")},
> >      {"address", VSH_OT_STRING, 0, N_("address of disk device")},
> > +    {"multifunction", VSH_OT_BOOL, 0, N_("use multifunction pci under specified address")},
> 
> I wrapped this to fit 80 columns.
> 
> > +                if (vshCommandOptBool(cmd, "multifunction"))
> > +                    virBufferAsprintf(&buf, " multifunction='on' />\n");
> > +                else
> > +                    virBufferAsprintf(&buf, " />\n");
> 
> virBufferAsprintf for a string literal is heavy-weight; I swapped this
> to virBufferAddLit.
> 

I'll write attach-interface patch carefully. 
-Kame




More information about the libvir-list mailing list