hal/examples locking.py,1.2,1.3
David Zeuthen
david at freedesktop.org
Mon May 23 07:06:29 PDT 2005
Update of /cvs/hal/hal/examples
In directory gabe:/tmp/cvs-serv8049/examples
Modified Files:
locking.py
Log Message:
2005-05-23 David Zeuthen <davidz at redhat.com>
* fdi/policy/10osvendor/10-storage-policy.fdi: Never ever use
sync as it reduces performance and makes people believe that
it wears out their drives (RH bug #157674)
* examples/locking.py: Fixup this a little bit
* tools/fstab-sync.8.in: Update the man page to reflect latest
changes.
* hald/hald_dbus.c (device_lock): Fix a doublefree when acquiring
lock (RH bug #158474)
Index: locking.py
===================================================================
RCS file: /cvs/hal/hal/examples/locking.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- locking.py 1 Mar 2005 20:38:42 -0000 1.2
+++ locking.py 23 May 2005 14:06:27 -0000 1.3
@@ -16,12 +16,16 @@
reason = "locking.py pid %d"%pid
bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
-hal_service = bus.get_service("org.freedesktop.Hal")
+
+devobj = bus.get_object("org.freedesktop.Hal", dev_udi)
+dev = dbus.Interface(devobj, "org.freedesktop.Hal.Device")
+#hal_service = bus.get_service("org.freedesktop.Hal")
+#dev = hal_service.get_object (dev_udi, "org.freedesktop.Hal.Device")
+
print "I am %s with pid %d"%(bus.get_connection().get_unique_name(), pid)
print
-dev = hal_service.get_object (dev_udi, "org.freedesktop.Hal.Device")
print "Attempting to lock %s for %d secs"%(dev_udi, duration)
print "with reason '%s'"%reason
More information about the hal-commit
mailing list