feat(usb_mass_storage): mount as disk (#333)

* feat(usb_mass_storage): mount as disk

* chore: try to set initial virtual media state from sysfs

* chore(usb-mass-storage): fix inquiry_string
This commit is contained in:
Aveline
2025-05-12 19:07:27 +02:00
committed by GitHub
parent 8ee0532f0e
commit 63c2272c45
6 changed files with 137 additions and 27 deletions

View File

@@ -14,10 +14,13 @@ var massStorageLun0Config = gadgetConfigItem{
order: 3001,
path: []string{"functions", "mass_storage.usb0", "lun.0"},
attrs: gadgetAttributes{
"cdrom": "1",
"ro": "1",
"removable": "1",
"file": "\n",
"inquiry_string": "JetKVM Virtual Media",
"cdrom": "1",
"ro": "1",
"removable": "1",
"file": "\n",
// the additional whitespace is intentional to avoid the "JetKVM V irtual Media" string
// https://github.com/jetkvm/rv1106-system/blob/778133a1c153041e73f7de86c9c434a2753ea65d/sysdrv/source/uboot/u-boot/drivers/usb/gadget/f_mass_storage.c#L2556
// Vendor (8 chars), product (16 chars)
"inquiry_string": "JetKVM Virtual Media",
},
}