libct/devices: change devices.Type to be a string

Possibly there was a specific reason to use a rune for this, but I noticed
that there's various parts in the code that has to convert values from a
string to this type. Using a string as type for this can simplify some of
that code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2021-08-13 00:21:49 +02:00
parent bb34048f93
commit 814f3ae1d9
6 changed files with 29 additions and 44 deletions
+1 -1
View File
@@ -710,7 +710,7 @@ func mknodDevice(dest string, node *devices.Device) error {
case devices.FifoDevice:
fileMode |= unix.S_IFIFO
default:
return fmt.Errorf("%c is not a valid device type for device %s", node.Type, node.Path)
return fmt.Errorf("%s is not a valid device type for device %s", node.Type, node.Path)
}
dev, err := node.Mkdev()
if err != nil {