diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2010-03-19 10:09:59 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2010-03-19 10:09:59 +0100 |
commit | 9aaa47296f60d58cee14a5dec3fa2d9c84ca1494 (patch) | |
tree | 7a07035c51fd46b3437251d74960380625b9a6c0 /tools/umount-udisks.c | |
parent | ddc7889419e2afe6dd86097a2afd1005ed38d93e (diff) |
Fix exit code of umount.udisks
Exit with return code 0 if the unmount succeeded.
https://launchpad.net/bugs/541740
Diffstat (limited to 'tools/umount-udisks.c')
-rw-r--r-- | tools/umount-udisks.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/umount-udisks.c b/tools/umount-udisks.c index 87a7f64..2813fe0 100644 --- a/tools/umount-udisks.c +++ b/tools/umount-udisks.c @@ -46,13 +46,14 @@ static DBusGConnection *bus; -static void +static int do_unmount (const char *object_path, const char *options) { DBusGProxy *proxy; GError *error; char **unmount_options; + int ret = 1; unmount_options = NULL; if (options != NULL) @@ -67,8 +68,10 @@ do_unmount (const char *object_path, g_error_free (error); goto out; } + ret = 0; /* success */ out: g_strfreev (unmount_options); + return ret; } int @@ -132,7 +135,7 @@ main (int argc, g_error_free (error); goto out; } - do_unmount (object_path, NULL); + ret = do_unmount (object_path, NULL); g_free (object_path); out: |