projects
/
project
/
fstools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9847f4e
)
libfstools: fix find_mount to return device path
author
Rafał Miłecki
<zajec5@gmail.com>
Tue, 23 Dec 2014 11:56:52 +0000
(12:56 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 6 Jan 2015 11:07:44 +0000
(12:07 +0100)
So far we were returning mount point which doesn't make sense for a
function that already takes mount point as an argument.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
libfstools/find.c
patch
|
blob
|
history
diff --git
a/libfstools/find.c
b/libfstools/find.c
index b50b63346142fb1143b76102d8398306ee23ecce..4c69d735d7af18d908d11ccbf520c02d7d0d9402 100644
(file)
--- a/
libfstools/find.c
+++ b/
libfstools/find.c
@@
-36,6
+36,9
@@
find_overlay_mount(char *overlay)
return ret;
}
+/*
+ * Find path of a device mounted to the given point.
+ */
char*
find_mount(char *mp)
{
@@
-53,6
+56,7
@@
find_mount(char *mp)
fclose(fp);
return NULL;
}
+ *t = '\0';
t++;
s = strstr(t, " ");
if (!s) {
@@
-63,7
+67,7
@@
find_mount(char *mp)
if (!strcmp(t, mp)) {
fclose(fp);
- return
t
;
+ return
line
;
}
}