[Ocfs2-tools-commits] mfasheh commits r622 - trunk/libo2dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Jan 28 16:57:34 CST 2005
Author: mfasheh
Date: 2005-01-28 16:57:32 -0600 (Fri, 28 Jan 2005)
New Revision: 622
Modified:
trunk/libo2dlm/o2dlm_test.c
Log:
* use a default path if one isn't provided
Modified: trunk/libo2dlm/o2dlm_test.c
===================================================================
--- trunk/libo2dlm/o2dlm_test.c 2005-01-28 01:58:30 UTC (rev 621)
+++ trunk/libo2dlm/o2dlm_test.c 2005-01-28 22:57:32 UTC (rev 622)
@@ -20,6 +20,8 @@
char cbuf[COMMAND_MAX_LEN];
+#define DEFAULT_DLMFS_PATH "/dev/ocfs2/dlm/"
+
char *dlmfs_path = NULL;
char *prog;
@@ -270,18 +272,18 @@
errcode_t error;
struct command_s c;
+ initialize_o2dl_error_table();
+
prog = argv[0];
if (argc < 2) {
- printf("please provide a path to an ocfs2_dlmfs mount\n");
- return 0;
+ dlmfs_path = DEFAULT_DLMFS_PATH;
+ printf("No fs path provided, using %s\n", dlmfs_path);
+ } else {
+ dlmfs_path = argv[1];
+ printf("Using fs at %s\n", dlmfs_path);
}
- initialize_o2dl_error_table();
-
- dlmfs_path = argv[1];
- printf("Using fs at %s\n", dlmfs_path);
-
while (!get_command(&c)) {
error = exec_command(&c);
More information about the Ocfs2-tools-commits
mailing list