projects
/
project
/
fstools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
block: support builtin fstab config
[project/fstools.git]
/
libfstools
/
overlay.c
diff --git
a/libfstools/overlay.c
b/libfstools/overlay.c
index
dc350b5
..
9e830a1
100644
(file)
--- a/
libfstools/overlay.c
+++ b/
libfstools/overlay.c
@@
-143,9
+143,8
@@
handle_whiteout(const char *dir)
}
int
}
int
-jffs2_switch(
int argc, char **arg
v)
+jffs2_switch(
struct volume *
v)
{
{
- struct volume *v;
char *mp;
int ret = -1;
char *mp;
int ret = -1;
@@
-157,7
+156,6
@@
jffs2_switch(int argc, char **argv)
return ret;
}
return ret;
}
- v = volume_find("rootfs_data");
mp = find_mount_point(v->blk, 0);
if (mp) {
fprintf(stderr, "rootfs_data:%s is already mounted as %s\n", v->blk, mp);
mp = find_mount_point(v->blk, 0);
if (mp) {
fprintf(stderr, "rootfs_data:%s is already mounted as %s\n", v->blk, mp);
@@
-201,9
+199,8
@@
jffs2_switch(int argc, char **argv)
return ret;
}
return ret;
}
-static int overlay_mount_fs(
void
)
+static int overlay_mount_fs(
struct volume *v
)
{
{
- struct volume *v;
char *fstype;
if (mkdir("/tmp/overlay", 0755)) {
char *fstype;
if (mkdir("/tmp/overlay", 0755)) {
@@
-211,12
+208,6
@@
static int overlay_mount_fs(void)
return -1;
}
return -1;
}
- v = volume_find("rootfs_data");
- if (!v) {
- fprintf(stderr, "rootfs_data does not exist\n");
- return -1;
- }
-
fstype = "jffs2";
switch (volume_identify(v)) {
fstype = "jffs2";
switch (volume_identify(v)) {
@@
-236,9
+227,8
@@
static int overlay_mount_fs(void)
return -1;
}
return -1;
}
-int mount_overlay(
void
)
+int mount_overlay(
struct volume *v
)
{
{
- struct volume *v = volume_find("rootfs_data");;
char *mp;
if (!v)
char *mp;
if (!v)
@@
-250,7
+240,7
@@
int mount_overlay(void)
return -1;
}
return -1;
}
- overlay_mount_fs();
+ overlay_mount_fs(
v
);
extroot_prefix = "/tmp/overlay";
if (!mount_extroot()) {
extroot_prefix = "/tmp/overlay";
if (!mount_extroot()) {