all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH common/container v2 0/2] fix invalid device passthrough being added to config
@ 2024-04-15 13:17 Filip Schauer
  2024-04-15 13:17 ` [pve-devel] [PATCH common v2 1/2] add get_device_stat helper subroutine Filip Schauer
  2024-04-15 13:17 ` [pve-devel] [PATCH container v2 2/2] fix invalid device passthrough being added to config Filip Schauer
  0 siblings, 2 replies; 5+ messages in thread
From: Filip Schauer @ 2024-04-15 13:17 UTC (permalink / raw)
  To: pve-devel

Fix a bug that allows a device passthrough entry to be added to the
config despite the device path not pointing to a device. Previously,
adding an invalid device passthrough entry would throw an error, but the
entry would still be added to the config. This is fixed by moving the
respective checks from update_lxc_config to update_pct_config, which is
run before the entry is written to the config file.

Changes since v1:
* Use "if" instead of "unless"
* Move device path validation and stat to seperate helper function

pve-common:

Filip Schauer (1):
  add get_device_stat helper subroutine

 src/PVE/Tools.pm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)


pve-container:

Filip Schauer (1):
  fix invalid device passthrough being added to config

 src/PVE/LXC.pm        | 18 ++++--------------
 src/PVE/LXC/Config.pm | 11 ++++++++++-
 2 files changed, 14 insertions(+), 15 deletions(-)


Summary over all repositories:
  3 files changed, 31 insertions(+), 16 deletions(-)

-- 
Generated by git-murpp 0.6.0




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-16  9:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 13:17 [pve-devel] [PATCH common/container v2 0/2] fix invalid device passthrough being added to config Filip Schauer
2024-04-15 13:17 ` [pve-devel] [PATCH common v2 1/2] add get_device_stat helper subroutine Filip Schauer
2024-04-15 13:54   ` Fiona Ebner
2024-04-16  9:28     ` Filip Schauer
2024-04-15 13:17 ` [pve-devel] [PATCH container v2 2/2] fix invalid device passthrough being added to config Filip Schauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal