projects
/
project
/
fstools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mount_root: convert to ulog() api
[project/fstools.git]
/
libfstools
/
find.c
diff --git
a/libfstools/find.c
b/libfstools/find.c
index
d9df173
..
4c69d73
100644
(file)
--- a/
libfstools/find.c
+++ b/
libfstools/find.c
@@
-36,6
+36,9
@@
find_overlay_mount(char *overlay)
return ret;
}
return ret;
}
+/*
+ * Find path of a device mounted to the given point.
+ */
char*
find_mount(char *mp)
{
char*
find_mount(char *mp)
{
@@
-53,6
+56,7
@@
find_mount(char *mp)
fclose(fp);
return NULL;
}
fclose(fp);
return NULL;
}
+ *t = '\0';
t++;
s = strstr(t, " ");
if (!s) {
t++;
s = strstr(t, " ");
if (!s) {
@@
-63,7
+67,7
@@
find_mount(char *mp)
if (!strcmp(t, mp)) {
fclose(fp);
if (!strcmp(t, mp)) {
fclose(fp);
- return
t
;
+ return
line
;
}
}
}
}
@@
-97,8
+101,8
@@
find_mount_point(char *block, int mtd_only)
t++;
if (mtd_only &&
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;
fclose(fp);
fprintf(stderr, "block is mounted with wrong fs\n");
return NULL;