X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=libfstools%2Ffind.c;h=fcc47a7dc1c10586d7e9f7f6ad79ddce2e5308bf;hb=bdcb075fafdac0bfe3207c23f64acd58432bad86;hp=190fa81ad564d75c56ba39b48df33f2729283789;hpb=34d36c29b9d599b0748d49aca8dab2c122633d35;p=project%2Ffstools.git diff --git a/libfstools/find.c b/libfstools/find.c index 190fa81..fcc47a7 100644 --- a/libfstools/find.c +++ b/libfstools/find.c @@ -46,7 +46,6 @@ find_mount(char *mp) { FILE *fp = fopen("/proc/mounts", "r"); static char line[256]; - char *point = NULL; if(!fp) return NULL; @@ -75,7 +74,7 @@ find_mount(char *mp) fclose(fp); - return point; + return NULL; } /* @@ -184,7 +183,7 @@ find_mount_point(char *block, int root_only) devname = tmp; /* if device name matches */ - if (!strncmp(block, devname, len)) { + if (!strncmp(block, devname, len + 1)) { if (root_only && fs_rootfs_only(fstype)) break;