From e1dee8c5ae3daa3a773d72404d5c80c04a1ae83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Wed, 11 Feb 2026 09:11:46 +0100 Subject: [PATCH] dbus: device: add SetManaged method The 'Managed' property only sets the managed state in runtime, but it is not possible to persist it to disk. Add a SetManaged method that will be able to persist it to disk. In this commit, it just modify the runtime state, so it actually only does the same than setting the property. Storing to disk will be added in next commits. (cherry picked from commit 9ff530c3228196fef3a477d5fd394142be04894b) (cherry picked from commit 4cd37cc464dd96a4d52aacebf6bdcef1e2605766) --- .../org.freedesktop.NetworkManager.Device.xml | 16 +++ src/core/devices/nm-device.c | 109 ++++++++++++++++++ src/libnm-client-impl/libnm.ver | 3 + src/libnm-client-impl/nm-device.c | 70 ++++++++++- src/libnm-client-public/nm-device.h | 9 ++ src/libnm-core-public/nm-dbus-interface.h | 15 +++ 6 files changed, 219 insertions(+), 3 deletions(-) diff --git a/introspection/org.freedesktop.NetworkManager.Device.xml b/introspection/org.freedesktop.NetworkManager.Device.xml index 085d2a1f74..4e89269cb3 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.xml @@ -175,6 +175,9 @@ property has a similar effect to configuring the device as unmanaged via the keyfile.unmanaged-devices setting in NetworkManager.conf. Changes to this value are not persistent and lost after NetworkManager restart. + + DEPRECATED: 1.56, 1.54.4: Use the SetManaged method instead, which supports + additional features like persisting the state to disk --> @@ -391,6 +394,19 @@ --> + + + + + +