Skip to content

Commit

Permalink
lxd/device: Update device option descriptions for usb to accurately…
Browse files Browse the repository at this point in the history
… convey compatibility with containers and vms

Signed-off-by: Kadin Sayani <[email protected]>
  • Loading branch information
kadinsayani committed Nov 12, 2024
1 parent d389056 commit 75babe6
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions lxd/device/unix_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,58 +91,52 @@ func (d *unixCommon) validateConfig(instConf instance.ConfigReader) error {
// defaultdesc: `0`
// shortdesc: UID of the device owner in the instance

// lxdmeta:generate(entities=device-unix-usb; group=device-conf; key=uid)
//
// lxdmeta:generate(entities=device-unix-usb; group=device-conf; key=uid)//
// ---
// type: integer
// defaultdesc: `0`
// condition: container
// shortdesc: UID of the device owner in the container
// shortdesc: UID of the device owner in the instance
"uid": unixValidUserID,
// lxdmeta:generate(entities=device-unix-{char+block+hotplug}; group=device-conf; key=gid)
//
// ---
// type: integer
// defaultdesc: `0`
// shortdesc: GID of the device owner in the instance

// lxdmeta:generate(entities=device-unix-usb; group=device-conf; key=gid)
//
// lxdmeta:generate(entities=device-unix-usb; group=device-conf; key=gid)//
// ---
// type: integer
// defaultdesc: `0`
// condition: container
// shortdesc: GID of the device owner in the container
// shortdesc: GID of the device owner in the instance
"gid": unixValidUserID,
// lxdmeta:generate(entities=device-unix-{char+block+hotplug}; group=device-conf; key=mode)
//
// ---
// type: integer
// defaultdesc: `0660`
// shortdesc: Mode of the device in the instance

// lxdmeta:generate(entities=device-unix-usb; group=device-conf; key=mode)
//
// ---
// type: integer
// defaultdesc: `0660`
// condition: container
// shortdesc: Mode of the device in the container
// shortdesc: Mode of the device in the instance
"mode": unixValidOctalFileMode,
// lxdmeta:generate(entities=device-unix-char; group=device-conf; key=required)
// See {ref}`devices-unix-char-hotplugging` for more information.
// ---
// type: bool
// defaultdesc: `true`
// shortdesc: Whether this device is required to start the instance

// lxdmeta:generate(entities=device-unix-block; group=device-conf; key=required)
// See {ref}`devices-unix-block-hotplugging` for more information.
// ---
// type: bool
// defaultdesc: `true`
// shortdesc: Whether this device is required to start the instance

// lxdmeta:generate(entities=device-unix-{hotplug+usb}; group=device-conf; key=required)
// The default is `false`, which means that all devices can be hotplugged.
// ---
Expand Down

0 comments on commit 75babe6

Please sign in to comment.