~psusi/ubuntu/utopic/udisks2/fix-standby

« back to all changes in this revision

Viewing changes to debian/patches/mount_in_media.patch

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-08-22 12:36:09 UTC
  • Revision ID: package-import@ubuntu.com-20120822123609-fq0id0yvp7day81x
Tags: 1.99.0-2
Add mount_in_media.patch: Mount drives in /media, not /run/media/, to stay
FHS compatible. (Closes: #680403, LP: #1020759)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Mount drives in /media, not /run/media/, to stay FHS compatible.
 
2
Author: Martin Pitt <martin.pitt@ubuntu.com>
 
3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51709
 
4
Bug-Debian: http://bugs.debian.org/680403
 
5
Bug-Ubuntu: https://launchpad.net/bugs/1020759
 
6
 
 
7
Index: udisks2/src/tests/integration-test
 
8
===================================================================
 
9
--- udisks2.orig/src/tests/integration-test     2012-08-22 12:25:42.346463891 +0200
 
10
+++ udisks2/src/tests/integration-test  2012-08-22 12:25:55.010464502 +0200
 
11
@@ -806,7 +806,7 @@
 
12
         # mount
 
13
         mount_path = fs.call_mount_sync(no_options, None)
 
14
 
 
15
-        self.assertTrue(mount_path.startswith('/run/media/'), mount_path)
 
16
+        self.assertTrue(mount_path.startswith('/media/'), mount_path)
 
17
         if label:
 
18
             self.assertTrue(mount_path.endswith(label))
 
19
 
 
20
Index: udisks2/src/udiskslinuxfilesystem.c
 
21
===================================================================
 
22
--- udisks2.orig/src/udiskslinuxfilesystem.c    2012-07-28 13:32:27.629931122 +0200
 
23
+++ udisks2/src/udiskslinuxfilesystem.c 2012-08-22 12:24:55.062461601 +0200
 
24
@@ -859,26 +859,26 @@
 
25
     }
 
26
 
 
27
   /* If we know the user-name and it doesn't have any '/' character in
 
28
-   * it, mount in /run/media/$USER
 
29
+   * it, mount in /media/$USER
 
30
    */
 
31
   if (user_name != NULL && strstr (user_name, "/") == NULL)
 
32
     {
 
33
-      mount_dir = g_strdup_printf ("/run/media/%s", user_name);
 
34
+      mount_dir = g_strdup_printf ("/media/%s", user_name);
 
35
       if (!g_file_test (mount_dir, G_FILE_TEST_EXISTS))
 
36
         {
 
37
-          /* First ensure that /run/media exists */
 
38
-          if (!g_file_test ("/run/media", G_FILE_TEST_EXISTS))
 
39
+          /* First ensure that /media exists */
 
40
+          if (!g_file_test ("/media", G_FILE_TEST_EXISTS))
 
41
             {
 
42
-              if (g_mkdir ("/run/media", 0755) != 0)
 
43
+              if (g_mkdir ("/media", 0755) != 0)
 
44
                 {
 
45
                   g_set_error (error,
 
46
                                UDISKS_ERROR,
 
47
                                UDISKS_ERROR_FAILED,
 
48
-                               "Error creating directory /run/media: %m");
 
49
+                               "Error creating directory /media: %m");
 
50
                   goto out;
 
51
                 }
 
52
             }
 
53
-          /* Then create the per-user /run/media/$USER */
 
54
+          /* Then create the per-user /media/$USER */
 
55
           if (g_mkdir (mount_dir, 0700) != 0)
 
56
             {
 
57
               g_set_error (error,