mirror of https://github.com/jetkvm/kvm.git
added config default values
This commit is contained in:
parent
a67e44560d
commit
318594ae64
|
@ -39,8 +39,8 @@ var defaultConfig = &Config{
|
|||
CloudURL: "https://api.jetkvm.com",
|
||||
AutoUpdateEnabled: true, // Set a default value
|
||||
UsbConfig: UsbConfig{
|
||||
UsbVendorId: "0x1d6b",
|
||||
UsbProductId: "0104",
|
||||
UsbVendorId: "0x1d6b", //The Linux Foundation
|
||||
UsbProductId: "0x0104", //Multifunction Composite Gadget¬
|
||||
UsbSerialNumber: "",
|
||||
UsbManufacturer: "JetKVM",
|
||||
UsbProduct: "JetKVM USB Emulation Device",
|
||||
|
|
11
usb.go
11
usb.go
|
@ -117,10 +117,11 @@ func writeGadgetConfig() error {
|
|||
return err
|
||||
}
|
||||
|
||||
LoadConfig()
|
||||
err = writeGadgetAttrs(kvmGadgetPath, [][]string{
|
||||
{"bcdUSB", "0x0200"}, //USB 2.0
|
||||
{"idVendor", "0x1d6b"}, //The Linux Foundation
|
||||
{"idProduct", "0104"}, //Multifunction Composite Gadget¬
|
||||
{"bcdUSB", "0x0200"}, //USB 2.0
|
||||
{"idVendor", config.UsbConfig.UsbVendorId},
|
||||
{"idProduct", config.UsbConfig.UsbProductId},
|
||||
{"bcdDevice", "0100"},
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -135,8 +136,8 @@ func writeGadgetConfig() error {
|
|||
|
||||
err = writeGadgetAttrs(gadgetStringsPath, [][]string{
|
||||
{"serialnumber", GetDeviceID()},
|
||||
{"manufacturer", "JetKVM"},
|
||||
{"product", "JetKVM USB Emulation Device"},
|
||||
{"manufacturer", config.UsbConfig.UsbManufacturer},
|
||||
{"product", config.UsbConfig.UsbProduct},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue