virtio: console: Register with sysfs and create a 'name' attribute for ports
The host can set a name for ports so that they're easily discoverable instead of going by the /dev/vportNpn naming. This attribute will be placed in /sys/class/virtio-ports/vportNpn/name. udev scripts can then create symlinks to the port using the name. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -40,6 +40,7 @@ struct virtio_console_control {
|
||||
#define VIRTIO_CONSOLE_CONSOLE_PORT 1
|
||||
#define VIRTIO_CONSOLE_RESIZE 2
|
||||
#define VIRTIO_CONSOLE_PORT_OPEN 3
|
||||
#define VIRTIO_CONSOLE_PORT_NAME 4
|
||||
|
||||
#ifdef __KERNEL__
|
||||
int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int));
|
||||
|
Reference in New Issue
Block a user