+static unsigned get_busy(
+ DBusConnection *c,
+ const char *name_owner) {
+
+ const char *un;
+
+ if (!name_owner || !*name_owner)
+ return FALSE;
+
+ /* If we ourselves own the device, then don't consider this 'busy' */
+ if ((un = dbus_bus_get_unique_name(c)))
+ if (strcmp(name_owner, un) == 0)
+ return FALSE;
+
+ return TRUE;
+}
+