projects
/
project
/
fstools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libfstools: fix matching fstype
[project/fstools.git]
/
libfstools
/
find.c
diff --git
a/libfstools/find.c
b/libfstools/find.c
index
71548f5
..
b50b633
100644
(file)
--- a/
libfstools/find.c
+++ b/
libfstools/find.c
@@
-73,7
+73,7
@@
find_mount(char *mp)
}
char*
}
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];
{
FILE *fp = fopen("/proc/mounts", "r");
static char line[256];
@@
-96,7
+96,9
@@
find_mount_point(char *block, char *fs)
*t = '\0';
t++;
*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;
fclose(fp);
fprintf(stderr, "block is mounted with wrong fs\n");
return NULL;