From cb039a028150878ef38a5d0cb80118ba22345785 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 24 Jun 2015 10:19:04 -0600 Subject: [PATCH] Minor tweak to last unionfs fix --- fs/unionfs/fs_unionfs.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c index 59ed0d5fbf..9a3c8560b5 100644 --- a/fs/unionfs/fs_unionfs.c +++ b/fs/unionfs/fs_unionfs.c @@ -361,11 +361,12 @@ static bool unionfs_ispartprefix(FAR const char *partprefix, if (prefix == NULL || *prefix == '\0') { - /* A non-NUL partial path canno be a contained in a NUL prefix */ + /* A non-NUL partial path cannot be a contained in a NUL prefix */ return false; } +#if 0 /* Only whole offset is currently supported */ /* Both the partial path and the prefix are non-NULL. Check if the partial * path is contained in the prefix. */ @@ -374,6 +375,14 @@ static bool unionfs_ispartprefix(FAR const char *partprefix, { return false; } +#else + /* Check if the trimmed offsets are identical */ + + if (partlen != pfxlen) + { + return false; + } +#endif if (strncmp(partprefix, prefix, partlen) == 0) {