return -1;
}
+ volume_init(v);
if (!strcmp(*argv, "jffs2mark"))
return jffs2_mark(v);
return jffs2_reset(v, reset);
return -1;
}
- return volume_init(v);
+ return 0;
}
static int
return ret;
}
+ volume_init(v);
mp = find_mount_point(v->blk, 0);
if (mp) {
ULOG_ERR("rootfs_data:%s is already mounted as %s\n", v->blk, mp);
break;
}
- volume_init(v);
-
if (mount(v->blk, "/tmp/overlay", fstype, MS_NOATIME, NULL)) {
ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %s\n",
fstype, v->blk, strerror(errno));
p->ubi_num = ubi_num;
p->ubi_volid = volid;
- return ubi_volume_init(v);
+ return 0;
}
static int ubi_part_match(struct volume *v, char *name, unsigned int ubi_num)
}
/* There isn't extroot, so just try to mount "rootfs_data" */
+ volume_init(data);
switch (volume_identify(data)) {
case FS_NONE:
ULOG_WARN("no usable overlay filesystem found, using tmpfs overlay\n");
if (!v)
return -1;
+ volume_init(v);
ret = volatile_write(v, 0);
if (!ret)
ret = sentinel_write(v, 0);
if (!v)
return -1;
+ volume_init(v);
block = config_find(v, &conf, &sentinel);
next = snapshot_next_free(v, &seq);
if (is_config(&conf) && conf.seq == seq)
if (!v)
return -1;
+ volume_init(v);
block = snapshot_next_free(v, &seq);
if (block < 0)
block = 0;
return -1;
}
+ volume_init(v);
+
fd = open(v->blk, O_WRONLY);
ULOG_INFO("%s - marking with 0x%08x\n", v->blk, owrt);
if (fd < 0) {
if (!v)
return -1;
+ volume_init(v);
if (argc > 2) {
block = atoi(argv[2]);
if (block >= (v->size / v->block_size)) {
if (!v)
return -1;
+ volume_init(v);
ULOG_INFO("sectors:\t%" PRIu64 ", block_size:\t%dK\n",
(uint64_t) v->size / v->block_size, v->block_size / 1024);
do {