mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-22 16:54:25 +01:00
device: use const strings for block-driver option instead of hard coding
Currently, the block driver option is specifed by hard coding, maybe it is better to use const string variables instead of hard coded strings. Another modification is to remove duplicate consts for virtio driver in manager.go. Fixes: #3321 Signed-off-by: Jason Zhang <zhanghj.lc@inspur.com>
This commit is contained in:
@@ -547,7 +547,7 @@ type DeviceInfo struct {
|
||||
ID string
|
||||
|
||||
// DriverOptions is specific options for each device driver
|
||||
// for example, for BlockDevice, we can set DriverOptions["blockDriver"]="virtio-blk"
|
||||
// for example, for BlockDevice, we can set DriverOptions["block-driver"]="virtio-blk"
|
||||
DriverOptions map[string]string
|
||||
}
|
||||
```
|
||||
@@ -835,7 +835,7 @@ type DeviceInfo struct {
|
||||
ID string
|
||||
|
||||
// DriverOptions is specific options for each device driver
|
||||
// for example, for BlockDevice, we can set DriverOptions["blockDriver"]="virtio-blk"
|
||||
// for example, for BlockDevice, we can set DriverOptions["block-driver"]="virtio-blk"
|
||||
DriverOptions map[string]string
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user