Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-29 Thread Gonglei (Arei)
Hi, Gerd > > > > > > > I think it is ok to allow only *changing* the bootindex. > > > > > > > > > > > > > Yes, that's no problem. > > > > > > > > > > But then yoy always will have a old entry where you can take the > > > > > suffix > > > > > from, and you don't need the suffix as parameter for t

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-28 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Gonglei (Arei) > Sent: Monday, July 28, 2014 6:16 PM > Subject: RE: [PATCH v2 1/7] bootindex: add modify_boot_device_path function > > > -Original Message- > > From: Gerd Hoffmann [mailto:kra...@redhat.com] > > Sent: Monday, July 28, 2014 6:02 PM >

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-28 Thread Gonglei (Arei)
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, July 28, 2014 6:02 PM > Subject: Re: [PATCH v2 1/7] bootindex: add modify_boot_device_path function > > Hi, > > > > > > I think it is ok to allow only *changing* the bootindex. > > > > > > > > > Yes, t

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-28 Thread Gerd Hoffmann
Hi, > > > > I think it is ok to allow only *changing* the bootindex. > > > > > > > Yes, that's no problem. > > > > But then yoy always will have a old entry where you can take the suffix > > from, and you don't need the suffix as parameter for the monitor > > command. > > > No, optional. >

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-28 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, July 28, 2014 5:28 PM > Subject: Re: [PATCH v2 1/7] bootindex: add modify_boot_device_path function > > > > I think it is ok to allow only *changing* the bootindex. > > > > > Yes, that's no problem.

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-28 Thread Gerd Hoffmann
> > I think it is ok to allow only *changing* the bootindex. > > > Yes, that's no problem. But then yoy always will have a old entry where you can take the suffix from, and you don't need the suffix as parameter for the monitor command. cheers, Gerd

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-28 Thread Gonglei (Arei)
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, July 28, 2014 4:31 PM > Subject: Re: [PATCH v2 1/7] bootindex: add modify_boot_device_path function > > Hi, > > > > ... because you can just copy the suffix from the old entry here, > > > instead of ex

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-28 Thread Gerd Hoffmann
Hi, > > ... because you can just copy the suffix from the old entry here, > > instead of expecting the caller pass it in. > > > Okay, agreed. > > But we should also think about the situation which a device don't have > old entry in global fw_boot_order list. Throw an error? I think it is ok

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-25 Thread Gonglei (Arei)
Hi, Gerd > -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Friday, July 25, 2014 5:46 PM > > Hi, > > > +void modify_boot_device_path(int32_t bootindex, DeviceState *dev, > > + const char *suffix) > > +{ > > +FWBootEntry *node, *i

Re: [Qemu-devel] [PATCH v2 1/7] bootindex: add modify_boot_device_path function

2014-07-25 Thread Gerd Hoffmann
Hi, > +void modify_boot_device_path(int32_t bootindex, DeviceState *dev, > + const char *suffix) > +{ > +FWBootEntry *node, *i; > + > +assert(dev != NULL || suffix != NULL); > + > +QTAILQ_FOREACH(i, &fw_boot_order, link) { > +if (i->bootindex == booti