1 |
flameeyes 12/04/29 23:32:31 |
2 |
|
3 |
Modified: lxc-0.8.0_rc1-blockmount.patch |
4 |
Log: |
5 |
Fix my own patch for mounting devices and files. |
6 |
|
7 |
(Portage version: 2.2.0_alpha101/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 app-emulation/lxc/files/lxc-0.8.0_rc1-blockmount.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc-0.8.0_rc1-blockmount.patch?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc-0.8.0_rc1-blockmount.patch?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc-0.8.0_rc1-blockmount.patch?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: lxc-0.8.0_rc1-blockmount.patch |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc-0.8.0_rc1-blockmount.patch,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- lxc-0.8.0_rc1-blockmount.patch 28 Apr 2012 00:17:01 -0000 1.1 |
23 |
+++ lxc-0.8.0_rc1-blockmount.patch 29 Apr 2012 23:32:31 -0000 1.2 |
24 |
@@ -1,4 +1,4 @@ |
25 |
-From f895fe1ad3aca8fed492df12adcd8710bca8ca32 Mon Sep 17 00:00:00 2001 |
26 |
+From dd411d7ae02f75aa2ffe8cd5e6271b36c113d03f Mon Sep 17 00:00:00 2001 |
27 |
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@×××××××××.eu> |
28 |
Date: Fri, 27 Apr 2012 17:01:33 -0700 |
29 |
Subject: [PATCH] Workaround requirement to use the realname of the block |
30 |
@@ -13,12 +13,12 @@ |
31 |
|
32 |
Signed-off-by: Diego Elio Pettenò <flameeyes@×××××××××.eu> |
33 |
--- |
34 |
- src/lxc/conf.c | 34 +++++++++++++++++++--------------- |
35 |
+ src/lxc/conf.c | 38 +++++++++++++++++++++----------------- |
36 |
src/lxc/conf.h | 1 + |
37 |
- 2 files changed, 20 insertions(+), 15 deletions(-) |
38 |
+ 2 files changed, 22 insertions(+), 17 deletions(-) |
39 |
|
40 |
diff --git a/src/lxc/conf.c b/src/lxc/conf.c |
41 |
-index e8088bb..593871a 100644 |
42 |
+index e8088bb..3ba6db6 100644 |
43 |
--- a/src/lxc/conf.c |
44 |
+++ b/src/lxc/conf.c |
45 |
@@ -350,9 +350,9 @@ static int mount_unknow_fs(const char *rootfs, const char *target, int mntopt) |
46 |
@@ -120,17 +120,34 @@ |
47 |
ERROR("failed to mount rootfs"); |
48 |
return -1; |
49 |
} |
50 |
-@@ -1110,7 +1112,9 @@ static int mount_entry_on_absolute_rootfs(struct mntent *mntent, |
51 |
+@@ -1099,7 +1101,7 @@ static inline int mount_entry_on_systemfs(struct mntent *mntent) |
52 |
+ static int mount_entry_on_absolute_rootfs(struct mntent *mntent, |
53 |
+ const struct lxc_rootfs *rootfs) |
54 |
+ { |
55 |
+- char *aux; |
56 |
++ char *aux, *rootfs_path; |
57 |
+ char path[MAXPATHLEN]; |
58 |
+ unsigned long mntflags; |
59 |
+ char *mntdata; |
60 |
+@@ -1110,14 +1112,16 @@ static int mount_entry_on_absolute_rootfs(struct mntent *mntent, |
61 |
return -1; |
62 |
} |
63 |
|
64 |
- aux = strstr(mntent->mnt_dir, rootfs->path); |
65 |
-+ aux = rootfs->isblock ? rootfs->mount : rootfs->path; |
66 |
++ rootfs_path = rootfs->isblock ? rootfs->mount : rootfs->path; |
67 |
+ |
68 |
-+ aux = strstr(mntent->mnt_dir, aux); |
69 |
++ aux = strstr(mntent->mnt_dir, rootfs_path); |
70 |
if (!aux) { |
71 |
WARN("ignoring mount point '%s'", mntent->mnt_dir); |
72 |
goto out; |
73 |
+ } |
74 |
+ |
75 |
+ snprintf(path, MAXPATHLEN, "%s/%s", rootfs->mount, |
76 |
+- aux + strlen(rootfs->path)); |
77 |
++ aux + strlen(rootfs_path)); |
78 |
+ |
79 |
+ ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type, |
80 |
+ mntflags, mntdata); |
81 |
diff --git a/src/lxc/conf.h b/src/lxc/conf.h |
82 |
index 09f55cb..b70e637 100644 |
83 |
--- a/src/lxc/conf.h |