diff options
author | David Zeuthen <davidz@redhat.com> | 2007-03-31 18:07:59 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2007-03-31 18:07:59 -0400 |
commit | 975a4defadb47ec8d3d6156f3eb20f6a67ec3009 (patch) | |
tree | c19fe4b46bc301e10cbd8a36ff931b2fe16ec9c2 /examples | |
parent | 154c2bac8ec500eba9a4f15a9e5ea244be1c9e5d (diff) |
change locking semantics a bit and add guidelines for SystemPowerManagement
The change in locking semantics is that a lock-holder can now access a
device even if other processes have locks on the device.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/interface-locking-test.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/examples/interface-locking-test.py b/examples/interface-locking-test.py index 3b98cd1f..ca60a910 100755 --- a/examples/interface-locking-test.py +++ b/examples/interface-locking-test.py @@ -17,9 +17,16 @@ device = dbus.Interface(bus.get_object("org.freedesktop.Hal", "/org/freedesktop/Hal/devices/volume_uuid_2232_1F11"), "org.freedesktop.Hal.Device") -manager.AcquireGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage", True) -#device.AcquireInterfaceLock("org.freedesktop.Hal.Device.Volume", True) +device_volume = dbus.Interface(bus.get_object("org.freedesktop.Hal", + "/org/freedesktop/Hal/devices/volume_uuid_2232_1F11"), + "org.freedesktop.Hal.Device.Volume") + +#manager.AcquireGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage", True) +#time.sleep(2) +#manager.ReleaseGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage") + +device.AcquireInterfaceLock("org.freedesktop.Hal.Device.Volume", False) +device_volume.Mount("", "", []) time.sleep(2) -manager.ReleaseGlobalInterfaceLock("org.freedesktop.Hal.Device.Storage") -#device.ReleaseInterfaceLock("org.freedesktop.Hal.Device.Volume") +device.ReleaseInterfaceLock("org.freedesktop.Hal.Device.Volume") |