}
int
-jffs2_switch(int argc, char **argv)
+jffs2_switch(struct volume *v)
{
- struct volume *v;
char *mp;
int ret = -1;
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);
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)) {
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)) {
return -1;
}
-int mount_overlay(void)
+int mount_overlay(struct volume *v)
{
- struct volume *v = volume_find("rootfs_data");;
char *mp;
if (!v)
return -1;
}
- overlay_mount_fs();
+ overlay_mount_fs(v);
extroot_prefix = "/tmp/overlay";
if (!mount_extroot()) {