libvirt/src/esx
Matthias Bolte 63166a4e0c Add virIndexToDiskName and fix mapping gap
esxVMX_IndexToDiskName handles indices up to 701. This limit comes
from a mapping gap in virDiskNameToIndex:

  sdzy -> 700
  sdzz -> 701
  sdaaa -> 728
  sdaab -> 729

This line in virDiskNameToIndex causes this gap:

  idx = (idx + i) * 26;

Fixing it by altering this line to:

  idx = (idx + (i < 1 ? 0 : 1)) * 26;

Also add a new version of virIndexToDiskName that handles the inverse
mapping for arbitrary indices.

* src/esx/esx_vmx.[ch]: remove esxVMX_IndexToDiskName
* src/util/util.[ch]: add virIndexToDiskName and fix mapping gap
* tests/esxutilstest.c: update test to verify that the gap is fixed
2009-12-03 18:07:49 +01:00
..
esx_driver.c esx: Fix CPU clock Hz to MHz conversion 2009-11-15 15:22:14 +01:00
esx_driver.h First version of the driver for VMWare ESX 2009-07-23 22:25:34 +02:00
esx_util.c ESX replace esxUtil_EqualSuffix() with virFileHasSuffix() 2009-09-23 15:00:54 +02:00
esx_util.h ESX replace esxUtil_EqualSuffix() with virFileHasSuffix() 2009-09-23 15:00:54 +02:00
esx_vi_methods.c ESX add esxDomainDefineXML() 2009-09-23 15:00:54 +02:00
esx_vi_methods.h ESX add esxDomainDefineXML() 2009-09-23 15:00:54 +02:00
esx_vi_types.c esx: Fix memory leak in esxVI_HostCpuIdInfo_Free() 2009-11-15 15:22:07 +01:00
esx_vi_types.h ESX Whitespace cleanup 2009-09-23 15:00:54 +02:00
esx_vi.c ESX: Fix memory leak in list handling functions. 2009-11-02 22:22:13 +01:00
esx_vi.h ESX: Don't automatically follow redirects. 2009-11-02 22:22:13 +01:00
esx_vmx.c Add virIndexToDiskName and fix mapping gap 2009-12-03 18:07:49 +01:00
esx_vmx.h Add virIndexToDiskName and fix mapping gap 2009-12-03 18:07:49 +01:00