static int ubi_volume_init(struct volume *v)
{
- char voldir[40], voldev[32], *volname, *voltype;
+ char voldir[40], voldev[32], *volname;
struct ubi_priv *p;
unsigned int volsize;
volname = read_string_from_file(voldir, "name");
- if (strncmp(name, volname, strlen(volname)))
+ if (strncmp(name, volname, strlen(volname) + 1))
return -1;
p = calloc(1, sizeof(struct ubi_priv));
unsigned int ubi_num;
int ret = -1;
+ if (find_filesystem("ubifs"))
+ return ret;
+
ubi_dir = opendir(ubi_dir_name);
/* check for os ubi support */
if (!ubi_dir)