summaryrefslogtreecommitdiff
authorMichael Biebl <biebl@debian.org>2009-11-05 02:11:30 (GMT)
committer Martin Pitt <martin.pitt@ubuntu.com>2009-11-05 14:08:19 (GMT)
commit6d8eed9015a6ca648fe1dad575621b6ea959a748 (patch) (side-by-side diff)
tree4136dbc0c625d388949c6b3529020c2f35488c5f
parent3181fd30f1e1e6ef940e5586c6683a37cac3fb81 (diff)
downloadhal-6d8eed9015a6ca648fe1dad575621b6ea959a748.zip
hal-6d8eed9015a6ca648fe1dad575621b6ea959a748.tar.gz
Support relative paths in umount.hal
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552139
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--tools/umount-hal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/umount-hal.c b/tools/umount-hal.c
index 719943c..81c3e08 100644
--- a/tools/umount-hal.c
+++ b/tools/umount-hal.c
@@ -31,12 +31,13 @@
#include <string.h>
#include <libhal.h>
#include <libhal-storage.h>
+#include "../hald/util.h"
int
main (int argc, char *argv[])
{
int ret;
- char *device_file_or_mount_point;
+ char device_file_or_mount_point[HAL_PATH_MAX];
DBusError error;
DBusConnection *con;
LibHalContext *hal_ctx;
@@ -58,7 +59,7 @@ main (int argc, char *argv[])
* first argument. TODO XXX FIXME: we ought to honor
* umount(8) options like -v for verbose.
*/
- device_file_or_mount_point = argv[1];
+ realpath(argv[1], device_file_or_mount_point);
dbus_error_init (&error);
con = dbus_bus_get (DBUS_BUS_SYSTEM, &error);