[Ocfs2-tools-commits] jlbec commits r1120 - trunk/libo2cb

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Nov 8 17:20:49 CST 2005


Author: jlbec
Date: 2005-11-08 17:20:48 -0600 (Tue, 08 Nov 2005)
New Revision: 1120

Modified:
   trunk/libo2cb/o2cb_abi.c
Log:

o The old O2CB_FORMAT_CLUSTER_DIR wasn't a format, so gcc didn't notice
  when we changed it.  Whoops.



Modified: trunk/libo2cb/o2cb_abi.c
===================================================================
--- trunk/libo2cb/o2cb_abi.c	2005-11-08 23:07:01 UTC (rev 1119)
+++ trunk/libo2cb/o2cb_abi.c	2005-11-08 23:20:48 UTC (rev 1120)
@@ -1217,7 +1217,15 @@
 
 errcode_t o2cb_list_clusters(char ***clusters)
 {
-	return o2cb_list_dir(O2CB_FORMAT_CLUSTER_DIR, clusters);
+	char path[PATH_MAX];
+	errcode_t ret;
+
+	ret = snprintf(path, PATH_MAX - 1, O2CB_FORMAT_CLUSTER_DIR,
+		       configfs_path);
+	if ((ret <= 0) || (ret == (PATH_MAX - 1)))
+		return O2CB_ET_INTERNAL_FAILURE;
+
+	return o2cb_list_dir(path, clusters);
 }
 
 void o2cb_free_cluster_list(char **clusters)



More information about the Ocfs2-tools-commits mailing list