[Ocfs2-tools-commits] manish commits r781 - trunk/ocfs2cdsl

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Sun Apr 3 14:01:25 CDT 2005


Author: manish
Date: 2005-04-03 14:01:23 -0500 (Sun, 03 Apr 2005)
New Revision: 781

Modified:
   trunk/ocfs2cdsl/ocfs2cdsl.c
Log:
get_ocfs2_root should work on the root too ;)


Modified: trunk/ocfs2cdsl/ocfs2cdsl.c
===================================================================
--- trunk/ocfs2cdsl/ocfs2cdsl.c	2005-04-02 22:20:25 UTC (rev 780)
+++ trunk/ocfs2cdsl/ocfs2cdsl.c	2005-04-03 19:01:23 UTC (rev 781)
@@ -373,7 +373,7 @@
 {
 	struct mntent *mnt;
 	FILE *fp;
-	int len, found_len;
+	int len;
 	char *found = NULL, *found_type = NULL;
 	char *ret = NULL;
 
@@ -386,9 +386,7 @@
 		len = strlen(mnt->mnt_dir);
 
 		if (strncmp(mnt->mnt_dir, path, len) == 0) {
-			if (path[len] == '/') {
-				found_len = len;
-
+			if (path[len] == '/' || path[len] == '\0') {
 				g_free(found);
 				found = g_strdup(mnt->mnt_dir);
 



More information about the Ocfs2-tools-commits mailing list