From 724a9654ada355d7a72fccd09897fdc70105f4ba 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. --- .../org.freedesktop.NetworkManager.Device.xml | 17 +++ src/core/devices/nm-device.c | 106 ++++++++++++++++++ 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 | 12 ++ 6 files changed, 214 insertions(+), 3 deletions(-) diff --git a/introspection/org.freedesktop.NetworkManager.Device.xml b/introspection/org.freedesktop.NetworkManager.Device.xml index 085d2a1f74..8c1d844875 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.58: Use the SetManaged method instead. It supports the same + than this property, and more, like persisting the state to disk. --> @@ -391,6 +394,20 @@ --> + + + + + + +