[Pvfs2-cvs] commit by slang in pvfs2/test/io/job: trove-job-mkfs.c

CVS commit program cvs at parl.clemson.edu
Tue Aug 22 18:37:57 EDT 2006


Update of /projects/cvsroot/pvfs2/test/io/job
In directory parlweb1:/tmp/cvs-serv32067/test/io/job

Modified Files:
      Tag: pvfs2-1-5-branch
	trove-job-mkfs.c 
Log Message:
migration fixes for problems seen on bgl:

1. trove_keyval_write requires all keys to be null terminated, and for the
specified length to include the null terminator.

2. need to check that the return value of translate_keyval_key, to make
sure that the keyval isn't a component filename.



Index: trove-job-mkfs.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/job/trove-job-mkfs.c,v
diff -p -u -r1.11.34.1 -r1.11.34.2
--- trove-job-mkfs.c	14 Jun 2006 20:14:57 -0000	1.11.34.1
+++ trove-job-mkfs.c	22 Aug 2006 22:37:57 -0000	1.11.34.2
@@ -34,8 +34,6 @@ int main(int argc, char **argv)
     TROVE_extent cur_extent;
     TROVE_handle_extent_array extent_array;
 
-    char root_handle_string[] = ROOT_HANDLE_KEYSTR;
-
     ret = parse_args(argc, argv);
     if (ret < 0) {
 	fprintf(stderr, "argument parsing failed.\n");
@@ -203,8 +201,8 @@ int main(int argc, char **argv)
     /* add attribute to collection for root handle */
     /* NOTE: should be using the data_sz field, but it doesn't exist yet. */
     /* NOTE: put ROOT_HANDLE_STRING in trove-test.h; not sure where it should be. */
-    key.buffer = root_handle_string;
-    key.buffer_sz = strlen(root_handle_string) + 1;
+    key.buffer = ROOT_HANDLE_KEYSTR;
+    key.buffer_sz = ROOT_HANDLE_KEYLEN;
     val.buffer = &root_handle;
     val.buffer_sz = sizeof(root_handle);
 



More information about the Pvfs2-cvs mailing list