Make ParseDevice public
This reverts the change in 5170a2c096 that made ParseDevice private Signed-off-by: Darren Shepherd <darren@rancher.com> Upstream-commit: 421786e9254b728298397b8ae3e81e9f6259f369 Component: engine
This commit is contained in:
@@ -283,7 +283,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
|
||||
// parse device mappings
|
||||
deviceMappings := []DeviceMapping{}
|
||||
for _, device := range flDevices.GetAll() {
|
||||
deviceMapping, err := parseDevice(device)
|
||||
deviceMapping, err := ParseDevice(device)
|
||||
if err != nil {
|
||||
return nil, nil, cmd, err
|
||||
}
|
||||
@@ -487,7 +487,8 @@ func parseKeyValueOpts(opts opts.ListOpts) ([]KeyValuePair, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func parseDevice(device string) (DeviceMapping, error) {
|
||||
// ParseDevice parses a device mapping string to a DeviceMapping struct
|
||||
func ParseDevice(device string) (DeviceMapping, error) {
|
||||
src := ""
|
||||
dst := ""
|
||||
permissions := "rwm"
|
||||
|
||||
Reference in New Issue
Block a user