hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Mon Mar 3 14:37:59 PST 2008


 tools/umount-hal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4caf585c66f5490a40f458015eaac8af1c277fe8
Author: David Zeuthen <davidz at redhat.com>
Date:   Mon Mar 3 17:35:29 2008 -0500

    fix /sbin/umount.hal to avoid always returning error if it succeeded
    
    Zdenek Prikryl <zprikryl at redhat.com> reported this bug on the hal
    mailing list (see below). The fix was simple; the return code type is
    INT32, not UINT32.
    
    Hello,
    according this page:
    http://lists.freedesktop.org/archives/hal/2007-March/007738.html, umount.hal
    should return correct return code. So, if I put a cd into a cdrom, then an
    automounter will mount it. In mtab in cdrom record is uhelper=hal and uid with
    correct value. If I want to umount it in a console as a user (uid of the user ==
    uid in mtab), then everything is fine, the cdrom is umounted. But umount itself
    returns 1 as a return code, because /sbin/umount.hal returns 1. According the
    upstream, it should be fixed (page above),  but in f8 it isn't fixed. More
    precisely, the patch is applied but it returns always 1 as the return code.
    
    Any idea where is a problem?

diff --git a/tools/umount-hal.c b/tools/umount-hal.c
index d4221bd..719943c 100644
--- a/tools/umount-hal.c
+++ b/tools/umount-hal.c
@@ -119,7 +119,7 @@ main (int argc, char *argv[])
 
 	if (!dbus_message_get_args (reply, 
 				    &error,
-				    DBUS_TYPE_UINT32, &hal_retcode,
+				    DBUS_TYPE_INT32, &hal_retcode,
 				    DBUS_TYPE_INVALID)) {
 		/* should never happen */
 		goto out;


More information about the hal-commit mailing list