summaryrefslogtreecommitdiff
path: root/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/hal/files/extra-patch-tools_hal-storage-mount.c')
-rw-r--r--sysutils/hal/files/extra-patch-tools_hal-storage-mount.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c b/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c
index ce9895f941a4..82a7fb6070e0 100644
--- a/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c
+++ b/sysutils/hal/files/extra-patch-tools_hal-storage-mount.c
@@ -1,30 +1,30 @@
---- tools/hal-storage-mount.c.orig Sun May 14 20:57:59 2006
-+++ tools/hal-storage-mount.c Sat Apr 7 12:50:53 2007
-@@ -513,23 +513,11 @@
- explicit_mount_point_given = FALSE;
- if (strlen (mount_point) == 0) {
- char *p;
-- const char *label;
-+ char *basename;
-
-- if (volume != NULL)
-- label = libhal_volume_get_label (volume);
-- else
-- label = NULL;
--
-- if (label != NULL) {
-- /* best - use label */
-- g_strlcpy (mount_point, label, sizeof (mount_point));
--
-- /* TODO: use drive type */
--
-- } else {
-- /* fallback - use "disk" */
-- g_snprintf (mount_point, sizeof (mount_point), "disk");
-- }
-+ basename = g_path_get_basename (device);
-+ g_strlcpy (mount_point, basename, sizeof (mount_point));
-+ g_free (basename);
-
- /* sanitize computed mount point name, e.g. replace invalid chars with '-' */
- p = mount_point;
+--- tools/hal-storage-mount.c.orig 2008-01-03 21:10:54.000000000 -0500
++++ tools/hal-storage-mount.c 2008-01-04 09:29:10.000000000 -0500
+@@ -583,23 +583,11 @@ handle_mount (LibHalContext *hal_ctx,
+ explicit_mount_point_given = FALSE;
+ if (strlen (mount_point) == 0) {
+ char *p;
+- const char *label;
++ char *basename;
+
+- if (volume != NULL)
+- label = libhal_volume_get_label (volume);
+- else
+- label = NULL;
+-
+- if (label != NULL) {
+- /* best - use label */
+- g_strlcpy (mount_point, label, sizeof (mount_point));
+-
+- /* TODO: use drive type */
+-
+- } else {
+- /* fallback - use "disk" */
+- g_snprintf (mount_point, sizeof (mount_point), "%s", "disk");
+- }
++ basename = g_path_get_basename (device);
++ g_strlcpy (mount_point, basename, sizeof (mount_point));
++ g_free (basename);
+
+ /* sanitize computed mount point name, e.g. replace invalid chars with '-' */
+ p = mount_point;