Skip to content

Commit

Permalink
lxc/storage_volume: Parse volume name to name device on attach
Browse files Browse the repository at this point in the history
This makes it so that even though one specifies the volume as `custom/volume`, the device name will be just `volume. Having this standard looks better and helps handling detaching.

Signed-off-by: hamistao <[email protected]>
  • Loading branch information
hamistao committed Dec 5, 2024
1 parent 2adf330 commit 68ff64f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lxc/storage_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (c *cmdStorageVolumeAttachProfile) run(cmd *cobra.Command, args []string) e
devPath := ""
devName := ""
if len(args) == 3 {
devName = args[1]
devName, _ = parseVolume("custom", args[1])
} else if len(args) == 4 {
// Only the path has been given to us.
devPath = args[3]
Expand Down

0 comments on commit 68ff64f

Please sign in to comment.