X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=blobdiff_plain;f=libfstools%2Ffind.c;h=b50b63346142fb1143b76102d8398306ee23ecce;hp=71548f5bfcb5a942135bed92f412ced50f83c057;hb=e0430f5c62f367e5a8e02755412977b02c3fc45e;hpb=9303a84fb4bcf84ebcf58f2afdd7cac7dde0161f diff --git a/libfstools/find.c b/libfstools/find.c index 71548f5..b50b633 100644 --- a/libfstools/find.c +++ b/libfstools/find.c @@ -73,7 +73,7 @@ find_mount(char *mp) } char* -find_mount_point(char *block, char *fs) +find_mount_point(char *block, int mtd_only) { FILE *fp = fopen("/proc/mounts", "r"); static char line[256]; @@ -96,7 +96,9 @@ find_mount_point(char *block, char *fs) *t = '\0'; t++; - if (fs && strncmp(t, fs, strlen(fs))) { + if (mtd_only && + strncmp(t, "jffs2", 5) && + strncmp(t, "ubifs", 5)) { fclose(fp); fprintf(stderr, "block is mounted with wrong fs\n"); return NULL;