return ret;
}
+/*
+ * Find path of a device mounted to the given point.
+ */
char*
find_mount(char *mp)
{
fclose(fp);
return NULL;
}
+ *t = '\0';
t++;
s = strstr(t, " ");
if (!s) {
if (!strcmp(t, mp)) {
fclose(fp);
- return t;
+ return line;
}
}
t++;
if (mtd_only &&
- strncmp(t, "jffs2", 6) &&
- strncmp(t, "ubifs", 6)) {
+ strncmp(t, "jffs2", 5) &&
+ strncmp(t, "ubifs", 5)) {
fclose(fp);
fprintf(stderr, "block is mounted with wrong fs\n");
return NULL;