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

Re: [libvirt] [PATCH v2] conf: Report sensible error for invalid disk name

On 11/20/12 16:20, Martin Kletzander wrote:
The error "... but the cause is unknown" appeared for XMLs similar to

  <disk type='file' device='cdrom'>
    <driver name='qemu' type='raw'/>
    <source file='/dev/zero'/>
    <target dev='sr0'/>

Notice unsupported disk type (for the driver), but also no address
specified. The first part is not a problem and we should not abort
immediately because of that, but the combination with the address
unknown was causing an unspecified error.

While fixing this, I added an error to one place where this return
value was not managed properly.
  - Error moved from virDiskNameToIndex util/util.c to
    virDomainDiskDefAssignAddress conf/domain_conf.c
  - One more error added into qemuParseCommandLine qemu/qemu_command.c

  src/conf/domain_conf.c  | 6 +++++-
  src/qemu/qemu_command.c | 6 +++++-
  2 files changed, 10 insertions(+), 2 deletions(-)



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