[maemo-commits] [maemo-commits] r11707 - in projects/haf/trunk/osso-gnome-vfs2/debian: . patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri May 18 15:30:02 EEST 2007
- Previous message: [maemo-commits] r11706 - in projects/haf/trunk/python-hildondesktop: . libhildondesktop
- Next message: [maemo-commits] r11709 - in projects/haf/trunk/gnome-vfs-filechooser-backend: . debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: richard Date: 2007-05-18 15:30:00 +0300 (Fri, 18 May 2007) New Revision: 11707 Modified: projects/haf/trunk/osso-gnome-vfs2/debian/changelog projects/haf/trunk/osso-gnome-vfs2/debian/patches/07-mmc-card-name.patch Log: Fix related to NB#54827 and NB#54832, but needs fix in ke-recv. Modified: projects/haf/trunk/osso-gnome-vfs2/debian/changelog =================================================================== --- projects/haf/trunk/osso-gnome-vfs2/debian/changelog 2007-05-18 08:19:25 UTC (rev 11706) +++ projects/haf/trunk/osso-gnome-vfs2/debian/changelog 2007-05-18 12:30:00 UTC (rev 11707) @@ -1,3 +1,9 @@ +osso-gnome-vfs2 (2.16.3-1osso16) unstable; urgency=low + + * Fix related to NB#54827 and NB#54832, but needs fix in ke-recv + + -- Richard Hult <richard at imendio.com> Fri, 18 May 2007 14:12:45 +0200 + osso-gnome-vfs2 (2.16.3-1osso15) unstable; urgency=low * Fixes: NB#54743, hildon_uri_get_actions_by_uri aborts calling ... Modified: projects/haf/trunk/osso-gnome-vfs2/debian/patches/07-mmc-card-name.patch =================================================================== --- projects/haf/trunk/osso-gnome-vfs2/debian/patches/07-mmc-card-name.patch 2007-05-18 08:19:25 UTC (rev 11706) +++ projects/haf/trunk/osso-gnome-vfs2/debian/patches/07-mmc-card-name.patch 2007-05-18 12:30:00 UTC (rev 11707) @@ -1,28 +1,42 @@ ---- libgnomevfs/gnome-vfs-volume-monitor-daemon.c-unmod 2007-02-02 10:45:54.000000000 +0100 -+++ libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2007-02-02 14:51:36.000000000 +0100 -@@ -25,6 +25,12 @@ - - #include <string.h> - #include <stdlib.h> -+/* Nokia patch */ +Index: libgnomevfs/gnome-vfs-volume-monitor-daemon.c +=================================================================== +--- libgnomevfs/gnome-vfs-volume-monitor-daemon.c (revision 11674) ++++ libgnomevfs/gnome-vfs-volume-monitor-daemon.c (arbetskopia) +@@ -841,6 +841,14 @@ static char * + make_volume_name_from_path_and_fs (const char *mount_path, const char *fs_type) + { + const char *name; ++ ++ /* Maemo patch. */ ++ char *tmp; ++ tmp = _gnome_vfs_filesystem_get_label_for_mmc (mount_path); ++ if (tmp) { ++ return tmp; ++ } ++ /* End of Maemo patch. */ + + if (mount_path[0] == '/' && mount_path[1] == '\0') { + return g_strdup (_("Root Volume")); +Index: libgnomevfs/gnome-vfs-filesystem-type.c +=================================================================== +--- libgnomevfs/gnome-vfs-filesystem-type.c (revision 11674) ++++ libgnomevfs/gnome-vfs-filesystem-type.c (arbetskopia) +@@ -127,3 +127,115 @@ _gnome_vfs_filesystem_use_trash (const c + + return FALSE; + } ++ ++ /* Maemo patch */ ++#define MMC_LABEL_FILE "/tmp/.mmc-volume-label" ++#define MMC_LABEL_FILE2 "/tmp/.internal-mmc-volume-label" ++#define MMC_LABEL_LENGTH 11 ++#define MMC_LABEL_UNDEFINED_NAME "mmc-undefined-name" ++#define MMC_LABEL_UNDEFINED_NAME_INTERNAL "mmc-undefined-name-internal" ++ +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> -+/* End of Nokia patch */ - #include <libgnomevfs/gnome-vfs-utils.h> - #include <glib/gi18n-lib.h> - -@@ -837,10 +843,119 @@ modify_volume_name_for_display (const ch - return name; - } - -+/* Nokia patch */ -+#define MMC_LABEL_FILE "/tmp/.mmc-volume-label" -+#define MMC_LABEL_FILE2 "/tmp/.internal-mmc-volume-label" -+#define MMC_LABEL_LENGTH 11 -+#define MMC_LABEL_UNDEFINED_NAME "mmc-undefined-name" -+#define MMC_LABEL_UNDEFINED_NAME_INTERNAL "mmc-undefined-name-internal" + +/* Same as make_utf8 but without adding "Invalid unicode". */ +static char * @@ -62,13 +76,19 @@ +} + +static char * -+get_mmc_name_from_label_file (const char *label_file, -+ gboolean internal) ++get_mmc_name (gboolean internal) +{ -+ int fd; -+ ssize_t size_read; -+ char buf[MMC_LABEL_LENGTH + 1]; ++ const gchar *label_file; ++ int fd; ++ ssize_t size_read; ++ char buf[MMC_LABEL_LENGTH + 1]; + ++ if (internal) { ++ label_file = MMC_LABEL_FILE2; ++ } else { ++ label_file = MMC_LABEL_FILE; ++ } ++ + if (!g_file_test (label_file, G_FILE_TEST_EXISTS)) { + goto unknown; + } @@ -98,38 +118,50 @@ + return g_strdup (MMC_LABEL_UNDEFINED_NAME); + } +} -+/* End of Nokia patch */ + - static char * - make_volume_name_from_path_and_fs (const char *mount_path, const char *fs_type) - { - const char *name; -+ /* Nokia patch */ ++char * ++_gnome_vfs_filesystem_get_label_for_mmc (const char *mount_path) ++{ + const char *mmc_mount; + + mmc_mount = g_getenv ("MMC_MOUNTPOINT"); -+ + if (mmc_mount && g_str_has_prefix (mount_path, mmc_mount)) { -+ gchar *mmc_name; -+ -+ mmc_name = get_mmc_name_from_label_file (MMC_LABEL_FILE, FALSE); -+ -+ if (mmc_name) { -+ return mmc_name; -+ } ++ return get_mmc_name (FALSE); + } + + mmc_mount = g_getenv ("INTERNAL_MMC_MOUNTPOINT"); + if (mmc_mount && g_str_has_prefix (mount_path, mmc_mount)) { -+ gchar *mmc_name; -+ -+ mmc_name = get_mmc_name_from_label_file (MMC_LABEL_FILE2, TRUE); -+ -+ if (mmc_name) { -+ return mmc_name; -+ } ++ return get_mmc_name (TRUE); + } -+ /* End of Nokia patch */ - - if (mount_path[0] == '/' && mount_path[1] == '\0') { - return g_strdup (_("Root Volume")); ++ ++ return NULL; ++} ++/* End of maemo patch */ +Index: libgnomevfs/gnome-vfs-filesystem-type.h +=================================================================== +--- libgnomevfs/gnome-vfs-filesystem-type.h (revision 11674) ++++ libgnomevfs/gnome-vfs-filesystem-type.h (arbetskopia) +@@ -28,5 +28,6 @@ + + char * _gnome_vfs_filesystem_volume_name (const char *fs_type); + gboolean _gnome_vfs_filesystem_use_trash (const char *fs_type); ++char * _gnome_vfs_filesystem_get_label_for_mmc (const char *mount_path); + + #endif /* GNOME_VFS_FILESYSTEM_TYPE_H */ +Index: libgnomevfs/gnome-vfs-hal-mounts.c +=================================================================== +--- libgnomevfs/gnome-vfs-hal-mounts.c (revision 11674) ++++ libgnomevfs/gnome-vfs-hal-mounts.c (arbetskopia) +@@ -570,6 +570,12 @@ _hal_volume_policy_get_display_name (Gno + goto out; + } + ++ name = _gnome_vfs_filesystem_get_label_for_mmc (libhal_volume_get_mount_point (hal_volume)); ++ if (name) { ++ g_print ("Volume fallback: %s\n", name); ++ goto out; ++ } ++ + /* Fallback: size of media */ + + size_str = gnome_vfs_format_file_size_for_display (libhal_volume_get_size (hal_volume));
- Previous message: [maemo-commits] r11706 - in projects/haf/trunk/python-hildondesktop: . libhildondesktop
- Next message: [maemo-commits] r11709 - in projects/haf/trunk/gnome-vfs-filechooser-backend: . debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]