return rc;
}
-int lock_mtab(void)
+static int lock_mtab(void)
{
int rc;
}
-void unlock_mtab(void)
+static void unlock_mtab(void)
{
unlink(MOUNTED_LOCK);
}
-int remove_from_mtab(char * mountpoint)
+static int remove_from_mtab(char * mountpoint)
{
int rc;
int num_matches;
/* fixup path if needed */
+ /* Trim any trailing slashes */
+ while ((strlen(mountpoint) > 1) &&
+ (mountpoint[strlen(mountpoint)-1] == '/'))
+ {
+ mountpoint[strlen(mountpoint)-1] = '\0';
+ }
+
/* make sure that this is a cifs filesystem */
rc = statfs(mountpoint, &statbuf);