Sfoglia il codice sorgente

devmapper: Fix prefix name to work with udev

Udev escapes "," used in device names to 0\x2c which breaks libdevmapper.
Instead use : to escape minor and minor which works.
Alexander Larsson 11 anni fa
parent
commit
2812baf395
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      devmapper/deviceset.go

+ 1 - 1
devmapper/deviceset.go

@@ -388,7 +388,7 @@ func (devices *DeviceSet) initDevmapper() error {
 	//	- Managed by docker
 	//	- Managed by docker
 	//	- The target of this device is at major <maj> and minor <min>
 	//	- The target of this device is at major <maj> and minor <min>
 	//	- If <inode> is defined, use that file inside the device as a loopback image. Otherwise use the device itself.
 	//	- If <inode> is defined, use that file inside the device as a loopback image. Otherwise use the device itself.
-	devices.devicePrefix = fmt.Sprintf("docker-%d,%d-%d", major(sysSt.Dev), minor(sysSt.Dev), sysSt.Ino)
+	devices.devicePrefix = fmt.Sprintf("docker-%d:%d-%d", major(sysSt.Dev), minor(sysSt.Dev), sysSt.Ino)
 	utils.Debugf("Generated prefix: %s", devices.devicePrefix)
 	utils.Debugf("Generated prefix: %s", devices.devicePrefix)
 
 
 	// Check for the existence of the device <prefix>-pool
 	// Check for the existence of the device <prefix>-pool