Daniel Veillard wrote: > On Tue, Aug 12, 2008 at 11:12:07AM +0100, Daniel P. Berrange wrote: > >> On Mon, Aug 11, 2008 at 10:01:16AM -0400, Cole Robinson wrote: >> >>> Jim Meyering wrote: >>> >>>> Cole Robinson <crobinso@xxxxxxxxxx> wrote: >>>> >>>>> parted doesn't seem to want the label 'dos', instead >>>>> wanting 'msdos'. Patch is basically s/dos/msdos/ >>>>> >>>> Hi Cole, >>>> >>>> This definitely needs to be fixed. >>>> >>>> FYI, "dos" appears to be the preferred name for that partition table type >>>> (google for "partition table" and either "dos" or "msdos"; also, partx >>>> --type accepts "dos", not "msdos"). Too bad Parted added the "ms" prefix. >>>> If it's not hard to implement, it would be nice to hide the implementation >>>> detail that Parted happens to call it the "msdos" label type. >>>> >>>> >>> We could just keep the outward facing label the same, and internally >>> map it to use msdos if calling 'parted mklabel' since it's the only >>> command that seems to use that value. Whatever people think is best. >>> >> Yep, I'd prefer that we just special case it internally when calling >> out to mklabel. >> > > Fine by me, my only worry is that we are somehow breaking the storage XML > format as a result, but I don't think this is widely used at this point > (at least with MSDos) and best done earlier than later, > > Applied and commited, > > thanks ! > > Daniel > Wait, I think there was a bit of miscommunication. I think Jim and Dan were recommending a different approach then the patch that was committed. The attached patch keeps the public facing formats the same, we just special case the dos format to use "msdos" if calling out to parted (this would require the current patch to be reverted though). Dan, is this what you meant? Thanks, Cole
commit 3d32ee59f405c6fb38b8ec01813804387f237a21 Author: Cole (Work Acct) <crobinso@xxxxxxxxxxxxxxxxxxxxx> Date: Tue Aug 12 21:29:58 2008 -0400 Use "dos" disk pool type when calling parted mklabel. diff --git a/src/storage_backend_disk.c b/src/storage_backend_disk.c index dac827b..31a35b5 100644 --- a/src/storage_backend_disk.c +++ b/src/storage_backend_disk.c @@ -406,7 +406,8 @@ virStorageBackendDiskBuildPool(virConnectPtr conn, PARTED, pool->def->source.devices[0].path, "mklabel", - virStorageBackendDiskPoolFormatToString(conn, pool->def->source.format), + ((pool->def->source.format == VIR_STORAGE_POOL_DISK_DOS) ? "msdos" : + virStorageBackendDiskPoolFormatToString(conn, pool->def->source.format)), NULL, };
-- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list