Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-09-08 Thread Daniel Veillard
On Fri, Sep 05, 2008 at 11:17:27PM -0400, Cole Robinson wrote: static int virStorageBackendDiskDeleteVol(virConnectPtr conn, - virStoragePoolObjPtr pool ATTRIBUTE_UNUSED, - virStorageVolDefPtr vol ATTRIBUTE_UNUSED, +

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-09-08 Thread Daniel Veillard
On Mon, Sep 08, 2008 at 09:33:40AM -0400, Cole Robinson wrote: Daniel Veillard wrote: +devname = basename(devpath); +srcname = basename(pool-def-source.devices[0].path); This seems to leak the two strings and not check for errors. That would need to be fixed before being

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-09-05 Thread Cole Robinson
Daniel P. Berrange wrote: On Tue, Aug 12, 2008 at 11:58:07PM -0400, Cole Robinson wrote: Daniel P. Berrange wrote: This isn't correct because the target path is not guarenteed to point to the master device name /dev/sda1. The user could have configured it to use a stable path such

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-08-20 Thread Daniel P. Berrange
On Tue, Aug 12, 2008 at 11:58:07PM -0400, Cole Robinson wrote: Daniel P. Berrange wrote: This isn't correct because the target path is not guarenteed to point to the master device name /dev/sda1. The user could have configured it to use a stable path such as

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-08-12 Thread Daniel Veillard
On Mon, Aug 11, 2008 at 03:58:41PM -0400, Cole Robinson wrote: The patch below implements virStorageVolDelete for volumes on a disk pool. The only interesting thing here is that parted wants a partition number to delete, so we need to peel off the end of the volume's target path which will

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-08-12 Thread Daniel P. Berrange
On Mon, Aug 11, 2008 at 03:58:41PM -0400, Cole Robinson wrote: The patch below implements virStorageVolDelete for volumes on a disk pool. The only interesting thing here is that parted wants a partition number to delete, so we need to peel off the end of the volume's target path which will

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-08-12 Thread Cole Robinson
Daniel P. Berrange wrote: On Mon, Aug 11, 2008 at 03:58:41PM -0400, Cole Robinson wrote: The patch below implements virStorageVolDelete for volumes on a disk pool. The only interesting thing here is that parted wants a partition number to delete, so we need to peel off the end of the

[libvirt] [PATCH] Implement vol delete for disk pools

2008-08-11 Thread Cole Robinson
The patch below implements virStorageVolDelete for volumes on a disk pool. The only interesting thing here is that parted wants a partition number to delete, so we need to peel off the end of the volume's target path which will be of the form '/dev/sda1' or similar (I assume. If not, it's still