[PVFS2-CVS] commit by slang in pvfs2/src/apps/admin: pvfs2-config.in pvfs2-cp.c pvfs2-event-mon-example.c pvfs2-fs-dump.c pvfs2-fsck.c pvfs2-ln.c pvfs2-ls.c pvfs2-mkdir.c pvfs2-mkspace.c pvfs2-perf-mon-example.c pvfs2-ping.c pvfs2-remove-object.c pvfs2-showcoll.c pvfs2-stat.c pvfs2-statfs.c

CVS commit program cvs at parl.clemson.edu
Wed Nov 9 20:26:57 EST 2005


Update of /projects/cvsroot/pvfs2/src/apps/admin
In directory parlweb:/tmp/cvs-serv439/src/apps/admin

Modified Files:
	pvfs2-config.in pvfs2-cp.c pvfs2-event-mon-example.c 
	pvfs2-fs-dump.c pvfs2-fsck.c pvfs2-ln.c pvfs2-ls.c 
	pvfs2-mkdir.c pvfs2-mkspace.c pvfs2-perf-mon-example.c 
	pvfs2-ping.c pvfs2-remove-object.c pvfs2-showcoll.c 
	pvfs2-stat.c pvfs2-statfs.c 
Log Message:
* malloc.h is obsolete in freebsd, check for it
* No error.h in freebsd
* linux allows Lu,Lx, and Ld to be interchangeable with llu,llx, and
lld.  Other platforms (solaris, bsd) don't.  Replaced all the L*
with ll*.
* bsd doesn't have mntent.h.  use fstab.h and our own funcs.
* bsd doesn't know about ssize_t.  Use size_t instead.
* bsd doesn't have asm errnos.  Check for each of those
errno macros and if not defined define to -1
* check for db3/db.h db4/db.h header if db path is specified using
--with-db
* darwin has aio support builtin, doesn't need -lrt
* remove kernel stuff in pvfs2-types.h that sets WORDSIZE.  gcc
defines __LP64__ on archs with 64bit longs so we use that instead.
* darwin's open doesn't accept O_LARGEFILE.  off_t is an int64 by
default.  define O_LARGEFILE if it hasn't been.
* need to run ranlib on darwin after libpvfs2.a gets installed to regenerate
table of contents



Index: pvfs2-config.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-config.in,v
diff -p -u -r1.6 -r1.7
--- pvfs2-config.in	2 Oct 2004 14:04:24 -0000	1.6
+++ pvfs2-config.in	10 Nov 2005 01:26:56 -0000	1.7
@@ -56,7 +56,10 @@ while test $# -gt 0; do
 	echo $libflags
 	;;
     --serverlibs|--static-serverlibs)
-	libflags="-L at libdir@ -lrt -lpthread -lpvfs2-server @LIBS@ @DB_LIB@" 
+	libflags="-L at libdir@ -lpthread -lpvfs2-server @LIBS@ @DB_LIB@" 
+	if [ x"@NEEDS_LIBRT@" = x"1" ]; then
+		libflags="$libflags -lrt"
+	fi
 	if [ x"@BUILD_GM@" = x"1" ]; then
 		libflags="$libflags -L at GM_HOME@/lib -lgm"
 	fi

Index: pvfs2-cp.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-cp.c,v
diff -p -u -r1.14 -r1.15
--- pvfs2-cp.c	1 Aug 2005 16:23:10 -0000	1.14
+++ pvfs2-cp.c	10 Nov 2005 01:26:56 -0000	1.15
@@ -246,7 +246,7 @@ static struct options* parse_args(int ar
 		tmp_opts->show_timings = 1;
 		break;
 	    case('s'):
-		ret = sscanf(optarg, SCANF_Ld, &tmp_opts->strip_size);
+		ret = sscanf(optarg, SCANF_lld, &tmp_opts->strip_size);
 		if(ret < 1){
 		    free(tmp_opts);
 		    return(NULL);
@@ -307,8 +307,8 @@ static double Wtime(void)
 
 static void print_timings( double time, int64_t total)
 {
-    printf("Wrote %Ld bytes in %f seconds. %f MB/seconds\n",
-	    Ld(total), time, (total/time)/(1024*1024));
+    printf("Wrote %lld bytes in %f seconds. %f MB/seconds\n",
+	    lld(total), time, (total/time)/(1024*1024));
 }
 
 /* read 'count' bytes from a (unix or pvfs2) file 'src', placing the result in
@@ -453,7 +453,6 @@ static int generic_open(file_object *obj
 		    return(-1);
 		}
 	    }
-
 	    obj->u.ufs.fd = open(obj->u.ufs.path,
                                O_WRONLY|O_CREAT|O_LARGEFILE|O_TRUNC,0666);
 	}

Index: pvfs2-event-mon-example.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-event-mon-example.c,v
diff -p -u -r1.15 -r1.16
--- pvfs2-event-mon-example.c	28 Jul 2004 14:32:29 -0000	1.15
+++ pvfs2-event-mon-example.c	10 Nov 2005 01:26:56 -0000	1.16
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
 	{
 	    if ((event_matrix[i][j].flags & PVFS_EVENT_FLAG_INVALID) == 0)
 	    {
-		printf("%d %d %d %Ld %Ld %d %d %d\n", 
+		printf("%d %d %d %lld %lld %d %d %d\n", 
 		       i, 
 		       (int)event_matrix[i][j].api,
 		       (int)event_matrix[i][j].operation,

Index: pvfs2-fs-dump.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-fs-dump.c,v
diff -p -u -r1.36 -r1.37
--- pvfs2-fs-dump.c	15 Sep 2004 14:12:44 -0000	1.36
+++ pvfs2-fs-dump.c	10 Nov 2005 01:26:56 -0000	1.37
@@ -409,15 +409,15 @@ int traverse_directory_tree(PVFS_fs_id c
     if (getattr_resp.attr.objtype != PVFS_TYPE_DIRECTORY)
     {
 	fprintf(stderr, "Cannot traverse object at "
-                "%Lu,%d (Not a Valid Directory)\n",
-                Lu(pref.handle), pref.fs_id);
+                "%llu,%d (Not a Valid Directory)\n",
+                llu(pref.handle), pref.fs_id);
         return -1;
     }
 
     if (handlelist_find_handle(pref.handle, &server_idx) < 0)
     {
-        printf("Handle %Lu appears to be missing; skipping!\n",
-               Lu(pref.handle));
+        printf("Handle %llu appears to be missing; skipping!\n",
+               llu(pref.handle));
         return -1;
     }
 
@@ -476,8 +476,8 @@ int descend(PVFS_fs_id cur_fs,
 
 	if (handlelist_find_handle(cur_handle, &server_idx) < 0)
 	{
-            printf("Handle %Lu appears to be missing; skipping!\n",
-                   Lu(cur_handle));
+            printf("Handle %llu appears to be missing; skipping!\n",
+                   llu(cur_handle));
             continue;
 	}
 
@@ -542,8 +542,8 @@ void verify_datafiles(PVFS_fs_id cur_fs,
 	ret = handlelist_find_handle(df_handles[i], &server_idx);
 	if (ret != 0)
 	{
-            printf("Datafile Handle %Lu appears to be missing; "
-                   "skipping!\n", Lu(df_handles[i]));
+            printf("Datafile Handle %llu appears to be missing; "
+                   "skipping!\n", llu(df_handles[i]));
             continue;
 	}
 
@@ -578,20 +578,20 @@ void analyze_remaining_handles(PVFS_fs_i
     {
 	if (dot_fmt)
 	{
-	    printf("\tH%Lu [shape=record, color=red, label = \"{(unknown) "
-                   "| %Lu (%d)}\"];\n",
-		   Lu(handle),
-		   Lu(handle),
+	    printf("\tH%llu [shape=record, color=red, label = \"{(unknown) "
+                   "| %llu (%d)}\"];\n",
+		   llu(handle),
+		   llu(handle),
 		   server_idx);
 	}
 	else
 	{
-	    printf("\t%s: %Lu\n",
+	    printf("\t%s: %llu\n",
 		   PVFS_mgmt_map_addr(cur_fs,
 				      creds,
 				      addr_array[server_idx],
 				      &tmp_type),
-		   Lu(handle));
+		   llu(handle));
 	}
     }
 }
@@ -769,15 +769,15 @@ static void print_root_entry(PVFS_handle
 {
     if (dot_fmt)
     {
-	printf("\tH%Lu [shape = record, fillcolor = grey, style = filled, label = \"{/ | %Lu (%d)}\"];\n",
-	       Lu(handle),
-	       Lu(handle),
+	printf("\tH%llu [shape = record, fillcolor = grey, style = filled, label = \"{/ | %llu (%d)}\"];\n",
+	       llu(handle),
+	       llu(handle),
 	       server_idx);
     }
     else
     {
-	printf("File: <Root>\n  handle = %Lu, type = %s, server = %d\n",
-	       Lu(handle),
+	printf("File: <Root>\n  handle = %llu, type = %s, server = %d\n",
+	       llu(handle),
 	       get_type_str(PVFS_TYPE_DIRECTORY),
 	       server_idx);
     }
@@ -806,21 +806,21 @@ static void print_entry(char *name,
     if (dot_fmt)
     {
 	/* always show connector */
-	printf("\tH%Lu -> H%Lu [style = bold];\n",
-	       Lu(parent_handle),
-	       Lu(handle));
+	printf("\tH%llu -> H%llu [style = bold];\n",
+	       llu(parent_handle),
+	       llu(handle));
 	switch (objtype) {
 	    case PVFS_TYPE_DIRECTORY:
-		printf("\tH%Lu [shape = record, fillcolor = grey, style = filled, label = \"{%s/ | %Lu (%d)}\"];\n",
-		       Lu(handle), name, Lu(handle), server_idx);
+		printf("\tH%llu [shape = record, fillcolor = grey, style = filled, label = \"{%s/ | %llu (%d)}\"];\n",
+		       llu(handle), name, llu(handle), server_idx);
 		break;
 	    case PVFS_TYPE_METAFILE:
-		printf("\tH%Lu [shape = record, fillcolor = aquamarine, style = filled, label = \"{%s | %Lu (%d)}\"];\n",
-		       Lu(handle), name, Lu(handle), server_idx);
+		printf("\tH%llu [shape = record, fillcolor = aquamarine, style = filled, label = \"{%s | %llu (%d)}\"];\n",
+		       llu(handle), name, llu(handle), server_idx);
 		break;
 	    case PVFS_TYPE_DATAFILE:
-		printf("\tH%Lu [shape = ellipse, fillcolor = violet, style = filled, label =\"%Lu (%d)\"];\n",
-		       Lu(handle), Lu(handle), server_idx);
+		printf("\tH%llu [shape = ellipse, fillcolor = violet, style = filled, label =\"%llu (%d)\"];\n",
+		       llu(handle), llu(handle), server_idx);
 		break;
 	    case PVFS_TYPE_DIRDATA:
 		break;
@@ -835,15 +835,15 @@ static void print_entry(char *name,
 	switch (objtype)
         {
 	    case PVFS_TYPE_DATAFILE:
-		printf("  handle = %Lu, type = %s, server = %d\n",
-		       Lu(handle),
+		printf("  handle = %llu, type = %s, server = %d\n",
+		       llu(handle),
 		       get_type_str(objtype),
 		       server_idx);
 		break;
 	    default:
-		printf("File: %s\n  handle = %Lu, type = %s, server = %d\n",
+		printf("File: %s\n  handle = %llu, type = %s, server = %d\n",
                        name,
-		       Lu(handle),
+		       llu(handle),
 		       get_type_str(objtype),
 		       server_idx);
 		break;

Index: pvfs2-fsck.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-fsck.c,v
diff -p -u -r1.11 -r1.12
--- pvfs2-fsck.c	1 Oct 2004 16:12:09 -0000	1.11
+++ pvfs2-fsck.c	10 Nov 2005 01:26:56 -0000	1.12
@@ -444,8 +444,8 @@ int match_dirdata(struct handlelist *hl,
     int ret, idx;
     PVFS_handle dirdata_handle;
 
-    printf("# looking for dirdata match to %Lu.\n",
-	   Lu(dir_ref.handle));
+    printf("# looking for dirdata match to %llu.\n",
+	   llu(dir_ref.handle));
 
     ret = PVFS_mgmt_get_dirdata_handle(dir_ref,
 				       &dirdata_handle,
@@ -456,7 +456,7 @@ int match_dirdata(struct handlelist *hl,
 	return -1;
     }
 
-    printf("# mgmt_get_dirdata returned %Lu.\n", Lu(dirdata_handle));
+    printf("# mgmt_get_dirdata returned %llu.\n", llu(dirdata_handle));
 
     if (handlelist_find_handle(hl, dirdata_handle, &idx) == 0)
     {
@@ -555,9 +555,9 @@ int descend(PVFS_fs_id cur_fs,
 					 creds) < 0)
 		    {
 			/* not recoverable; remove */
-			printf("* File %s (%Lu) is not recoverable.\n",
+			printf("* File %s (%llu) is not recoverable.\n",
 			       cur_file,
-			       Lu(cur_handle));
+			       llu(cur_handle));
 
 			/* verify_datafiles() removed the datafiles */
 			ret = remove_object(entry_ref,
@@ -580,9 +580,9 @@ int descend(PVFS_fs_id cur_fs,
 					creds);
 		    if (ret != 0)
 		    {
-			printf("* Directory %s (%Lu) is missing DirData.\n",
+			printf("* Directory %s (%llu) is missing DirData.\n",
 			       cur_file,
-			       Lu(cur_handle));
+			       llu(cur_handle));
 
 			ret = remove_object(entry_ref,
 					    getattr_resp.attr.objtype,
@@ -683,8 +683,8 @@ int verify_datafiles(PVFS_fs_id cur_fs,
 
 	if ((!in_main_list) && (!in_alt_list))
 	{
-	    printf("# datafile handle %Lu missing from list\n",
-		   Lu(df_handles[i]));
+	    printf("# datafile handle %llu missing from list\n",
+		   llu(df_handles[i]));
 	    /* if possible, rebuild the datafile. */
 	    /* otherwise delete datafiles, return error to get 
 	     * handle and dirent removed.
@@ -768,7 +768,7 @@ struct handlelist *find_sub_trees(PVFS_f
 		break;
 	    case PVFS_TYPE_DIRECTORY:
 		/* add to directory list */
-		printf("# looking for dirdata match to %Lu.\n", Lu(handle));
+		printf("# looking for dirdata match to %llu.\n", llu(handle));
 
 		descend(cur_fs,
 			hl_all,
@@ -834,17 +834,17 @@ struct handlelist *fill_lost_and_found(P
 			       creds,
 			       &getattr_resp);
 	if (ret) {
-	    printf("warning: problem calling getattr on %Lu; assuming datafile for now.\n",
-		   Lu(handle));
+	    printf("warning: problem calling getattr on %llu; assuming datafile for now.\n",
+		   llu(handle));
 	    getattr_resp.attr.objtype = PVFS_TYPE_DATAFILE;
 	}
 
 	switch (getattr_resp.attr.objtype)
 	{
 	    case PVFS_TYPE_METAFILE:
-		printf("# trying to salvage %s %Ld.\n",
+		printf("# trying to salvage %s %lld.\n",
 		       get_type_str(getattr_resp.attr.objtype),
-		       Lu(handle));
+		       llu(handle));
 		if (verify_datafiles(cur_fs,
 				     hl_all,
 				     alt_hl,
@@ -859,7 +859,7 @@ struct handlelist *fill_lost_and_found(P
 		}
 		else
 		{
-		    sprintf(filename + 9, "%Lu", Lu(handle));
+		    sprintf(filename + 9, "%llu", llu(handle));
 		    ret = create_dirent(laf_ref,
 					filename,
 					handle,
@@ -882,7 +882,7 @@ struct handlelist *fill_lost_and_found(P
                     assert(ret == 0);
                 }
 
-		sprintf(dirname + 8, "%Lu", Lu(handle));
+		sprintf(dirname + 8, "%llu", llu(handle));
 		ret = create_dirent(laf_ref,
 				    dirname,
 				    handle,
@@ -897,21 +897,21 @@ struct handlelist *fill_lost_and_found(P
 		break;
 	    case PVFS_TYPE_DATAFILE:
 #if 0
-		printf("# saving %Lu (datafile) for later.\n", Lu(handle));
+		printf("# saving %llu (datafile) for later.\n", llu(handle));
 #endif
 		handlelist_add_handle(alt_hl, handle, server_idx);
 		break;
 	    case PVFS_TYPE_DIRDATA:
 #if 0
-		printf("# saving %Lu (dirdata) for later.\n", Lu(handle));
+		printf("# saving %llu (dirdata) for later.\n", llu(handle));
 #endif
 		handlelist_add_handle(alt_hl, handle, server_idx);
 		break;
 	    case PVFS_TYPE_SYMLINK:
 	    default:
 		/* delete on handle -- unknown type */
-		printf("* delete handle %Lu (unknown type).\n",
-		       Lu(handle));
+		printf("* delete handle %llu (unknown type).\n",
+		       llu(handle));
 		break;
 	}
 
@@ -945,8 +945,8 @@ void cull_leftovers(PVFS_fs_id cur_fs,
 			       creds,
 			       &getattr_resp);
 	if (ret) {
-	    printf("warning: problem calling getattr on %Lu\n",
-		   Lu(handle));
+	    printf("warning: problem calling getattr on %llu\n",
+		   llu(handle));
 	    getattr_resp.attr.objtype = 0;
 	}
 
@@ -1030,11 +1030,11 @@ int create_dirent(PVFS_object_ref dir_re
 {
     int ret;
 
-    printf("* %s creating new reference to %s (%Lu) in %Lu.\n",
+    printf("* %s creating new reference to %s (%llu) in %llu.\n",
 	   fsck_opts->destructive ? "" : "not",
 	   name,
-	   Lu(handle),
-	   Lu(dir_ref.handle));
+	   llu(handle),
+	   llu(dir_ref.handle));
 
     if (fsck_opts->destructive) {
 	ret = PVFS_mgmt_create_dirent(dir_ref,
@@ -1059,11 +1059,11 @@ int remove_directory_entry(PVFS_object_r
 {
     int ret;
 
-    printf("* %s deleting directory entry for missing object %s (%Lu) from dir %Lu.\n",
+    printf("* %s deleting directory entry for missing object %s (%llu) from dir %llu.\n",
 	   fsck_opts->destructive ? "" : "not",
 	   name,
-	   Lu(entry_ref.handle),
-	   Lu(dir_ref.handle));
+	   llu(entry_ref.handle),
+	   llu(dir_ref.handle));
 
     if (fsck_opts->destructive) {
 	ret = PVFS_mgmt_remove_dirent(dir_ref,
@@ -1086,10 +1086,10 @@ int remove_object(PVFS_object_ref obj_re
 {
     int ret;
 
-    printf("* %s removing %s %Lu.\n",
+    printf("* %s removing %s %llu.\n",
 	   fsck_opts->destructive ? "" : "not",
 	   get_type_str(obj_type),
-	   Lu(obj_ref.handle));
+	   llu(obj_ref.handle));
 
     if (fsck_opts->destructive) {
 	ret = PVFS_mgmt_remove_object(obj_ref,
@@ -1250,7 +1250,7 @@ static void handlelist_remove_handle(str
     }
 
     if (i > hl->used_array[server_idx]) {
-	printf("! problem removing %Lu/%d.\n", Lu(handle), server_idx);
+	printf("! problem removing %llu/%d.\n", llu(handle), server_idx);
     }
 
     assert(i <= hl->used_array[server_idx]); /* <= because of decrement! */
@@ -1309,7 +1309,7 @@ static void handlelist_print(struct hand
 
     /* NOTE: REALLY ONLY PRINTS FOR ONE SERVER RIGHT NOW */
     for (i=0; i < hl->used_array[0]; i++) {
-	printf("%Lu ", Lu(hl->list_array[0][i]));
+	printf("%llu ", llu(hl->list_array[0][i]));
     }
     printf("\n");
 }

Index: pvfs2-ln.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-ln.c,v
diff -p -u -r1.1 -r1.2
--- pvfs2-ln.c	11 Jul 2005 20:26:08 -0000	1.1
+++ pvfs2-ln.c	10 Nov 2005 01:26:56 -0000	1.2
@@ -179,9 +179,9 @@ static int make_link(PVFS_credentials   
         fprintf(stdout, "\t owner [%d]\n",  attr.owner);
         fprintf(stdout, "\t group [%d]\n",  attr.group);
         fprintf(stdout, "\t perms [%o]\n",  attr.perms);
-        fprintf(stdout, "\t atime [%Lu]\n", Lu(attr.atime));
-        fprintf(stdout, "\t mtime [%Lu]\n", Lu(attr.mtime));
-        fprintf(stdout, "\t ctime [%Lu]\n", Lu(attr.ctime));
+        fprintf(stdout, "\t atime [%llu]\n", llu(attr.atime));
+        fprintf(stdout, "\t mtime [%llu]\n", llu(attr.mtime));
+        fprintf(stdout, "\t ctime [%llu]\n", llu(attr.ctime));
     }
 
     ret = PVFS_sys_symlink(szBaseName, 

Index: pvfs2-ls.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-ls.c,v
diff -p -u -r1.61 -r1.62
--- pvfs2-ls.c	12 Sep 2005 21:27:38 -0000	1.61
+++ pvfs2-ls.c	10 Nov 2005 01:26:56 -0000	1.62
@@ -88,8 +88,8 @@ do {                                    
           on base dirs, but I'm not sure it's worth it      \
         */                                                  \
         if (opts->list_inode && !opts->list_long) {         \
-            printf("%Lu .\n",Lu(refn.handle));              \
-            printf("%Lu .. (faked)\n",Lu(refn.handle));     \
+            printf("%llu .\n",llu(refn.handle));              \
+            printf("%llu .. (faked)\n",llu(refn.handle));     \
         }                                                   \
         else if (opts->list_long) {                         \
             print_entry(".", refn.handle,                   \
@@ -202,7 +202,7 @@ void print_entry_attr(
 
     if (opts->list_inode)
     {
-        snprintf(scratch_inode,16,"%Lu ",Lu(handle));
+        snprintf(scratch_inode,16,"%llu ",llu(handle));
         inode = scratch_inode;
     }
 
@@ -228,7 +228,7 @@ void print_entry_attr(
     }
     else
     {
-        snprintf(scratch_size,16, "%Ld", Ld(size));
+        snprintf(scratch_size,16, "%lld", lld(size));
     }
     format_size_string(scratch_size,11,&formatted_size,1,1);
 
@@ -353,7 +353,7 @@ void print_entry(
     {
         if (opts->list_inode)
         {
-            printf("%Lu %s\n", Lu(handle), entry_name);
+            printf("%llu %s\n", llu(handle), entry_name);
         }
         else
         {
@@ -372,8 +372,8 @@ void print_entry(
                            &credentials, &getattr_response);
     if (ret)
     {
-        fprintf(stderr,"Failed to get attributes on handle %Lu,%d\n",
-                Lu(handle),fs_id);
+        fprintf(stderr,"Failed to get attributes on handle %llu,%d\n",
+                llu(handle),fs_id);
         PVFS_perror("Getattr failure", ret);
         return;
     }

Index: pvfs2-mkdir.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-mkdir.c,v
diff -p -u -r1.6 -r1.7
--- pvfs2-mkdir.c	12 Jul 2005 15:40:44 -0000	1.6
+++ pvfs2-mkdir.c	10 Nov 2005 01:26:56 -0000	1.7
@@ -310,9 +310,9 @@ static int make_directory(PVFS_credentia
         fprintf(stdout, "\t owner [%d]\n",  attr.owner);
         fprintf(stdout, "\t group [%d]\n",  attr.group);
         fprintf(stdout, "\t perms [%o]\n",  attr.perms);
-        fprintf(stdout, "\t atime [%Lu]\n", Lu(attr.atime));
-        fprintf(stdout, "\t mtime [%Lu]\n", Lu(attr.mtime));
-        fprintf(stdout, "\t ctime [%Lu]\n", Lu(attr.ctime));
+        fprintf(stdout, "\t atime [%llu]\n", llu(attr.atime));
+        fprintf(stdout, "\t mtime [%llu]\n", llu(attr.mtime));
+        fprintf(stdout, "\t ctime [%llu]\n", llu(attr.ctime));
     }
 
     ret = PVFS_sys_mkdir(basename_ptr, 

Index: pvfs2-mkspace.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-mkspace.c,v
diff -p -u -r1.17 -r1.18
--- pvfs2-mkspace.c	29 Oct 2004 20:13:02 -0000	1.17
+++ pvfs2-mkspace.c	10 Nov 2005 01:26:56 -0000	1.18
@@ -209,7 +209,7 @@ static void print_options(options_t *opt
                (opts->delete_storage ? "yes" : "no"));
         printf("\tverbose             : %s\n",
                (opts->verbose ? "ON" : "OFF"));
-        printf("\troot handle         : %Lu\n", Lu(opts->root_handle));
+        printf("\troot handle         : %llu\n", llu(opts->root_handle));
         printf("\tcollection-only mode: %s\n",
                (opts->collection_only ? "ON" : "OFF"));
         printf("\tcollection id       : %d\n", opts->coll_id);

Index: pvfs2-perf-mon-example.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-perf-mon-example.c,v
diff -p -u -r1.20 -r1.21
--- pvfs2-perf-mon-example.c	28 Jul 2004 14:32:29 -0000	1.20
+++ pvfs2-perf-mon-example.c	10 Nov 2005 01:26:56 -0000	1.21
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
                 {
 		    break;
                 }
-		printf("\t%Lu", Lu(perf_matrix[i][j].metadata_read));
+		printf("\t%llu", llu(perf_matrix[i][j].metadata_read));
 	    }
 
             printf("\nwrite:  %-30s ",
@@ -246,7 +246,7 @@ int main(int argc, char **argv)
                 {
 		    break;
                 }
-		printf("\t%Lu", Lu(perf_matrix[i][j].metadata_write));
+		printf("\t%llu", llu(perf_matrix[i][j].metadata_write));
 	    }
 
 	    printf("\ntimestep:\t\t\t");

Index: pvfs2-ping.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-ping.c,v
diff -p -u -r1.42 -r1.43
--- pvfs2-ping.c	4 Oct 2005 19:04:54 -0000	1.42
+++ pvfs2-ping.c	10 Nov 2005 01:26:56 -0000	1.43
@@ -195,7 +195,7 @@ int main(int argc, char **argv)
 	fprintf(stderr, "Failure: could not lookup root handle.\n");
 	return(-1);
     }
-    printf("\n   Root handle: %Lu\n", Lu(resp_lookup.ref.handle));
+    printf("\n   Root handle: %llu\n", llu(resp_lookup.ref.handle));
 
     /* check that only one server controls root handle */
     /* TODO: we need a way to get information out about which server

Index: pvfs2-remove-object.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-remove-object.c,v
diff -p -u -r1.5 -r1.6
--- pvfs2-remove-object.c	10 Aug 2004 18:34:01 -0000	1.5
+++ pvfs2-remove-object.c	10 Nov 2005 01:26:56 -0000	1.6
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
             (ref.fs_id == PVFS_FS_ID_NULL))
         {
             fprintf(stderr, "Invalid object reference specified: "
-                    "%Lu,%d\n", Lu(ref.handle), ref.fs_id);
+                    "%llu,%d\n", llu(ref.handle), ref.fs_id);
             return ret;
         }
     }
@@ -189,14 +189,14 @@ int main(int argc, char **argv)
             (ref.fs_id == PVFS_FS_ID_NULL))
         {
             fprintf(stderr, "Invalid parent reference specified: "
-                    "%Lu,%d\n", Lu(ref.handle), ref.fs_id);
+                    "%llu,%d\n", llu(ref.handle), ref.fs_id);
             return ret;
         }
 
         if (!user_opts->dirent_name)
         {
             fprintf(stderr, "No dirent name specified under parent "
-                    "%Lu,%d\n", Lu(ref.handle), ref.fs_id);
+                    "%llu,%d\n", llu(ref.handle), ref.fs_id);
             return ret;
         }
     }
@@ -212,8 +212,8 @@ int main(int argc, char **argv)
 
     if (user_opts->remove_object_only)
     {
-        fprintf(stderr,"Attempting to remove object %Lu,%d\n",
-                Lu(ref.handle), ref.fs_id);
+        fprintf(stderr,"Attempting to remove object %llu,%d\n",
+                llu(ref.handle), ref.fs_id);
 
         ret = PVFS_mgmt_remove_object(ref, &credentials);
         if (ret)
@@ -223,8 +223,8 @@ int main(int argc, char **argv)
     }
     else
     {
-        fprintf(stderr,"Attempting to remove dirent \"%s\" under %Lu,%d"
-                "\n", user_opts->dirent_name, Lu(ref.handle), ref.fs_id);
+        fprintf(stderr,"Attempting to remove dirent \"%s\" under %llu,%d"
+                "\n", user_opts->dirent_name, llu(ref.handle), ref.fs_id);
 
         ret = PVFS_mgmt_remove_dirent(
             ref, user_opts->dirent_name, &credentials);

Index: pvfs2-showcoll.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-showcoll.c,v
diff -p -u -r1.17 -r1.18
--- pvfs2-showcoll.c	17 Sep 2004 21:15:40 -0000	1.17
+++ pvfs2-showcoll.c	10 Nov 2005 01:26:56 -0000	1.18
@@ -173,11 +173,11 @@ int main(int argc, char **argv)
     else {
 	fprintf(stdout,
 		"Storage space %s, collection %s (coll_id = %d, "
-                "root_handle = 0x%08Lx):\n",
+                "root_handle = 0x%08llx):\n",
 		storage_space,
 		collection,
 		coll_id,
-		Lu(root_handle));
+		llu(root_handle));
     }
 
     if (got_dspace_handle)
@@ -304,11 +304,11 @@ static int print_dspace(TROVE_coll_id co
     if (ret != 1) return -1;
 		
     fprintf(stdout,
-	    "\t0x%08Lx (dspace_getattr output: type = %s, b_size = %Ld, k_size = %Ld)\n",
-	    Lu(handle),
+	    "\t0x%08llx (dspace_getattr output: type = %s, b_size = %lld, k_size = %lld)\n",
+	    llu(handle),
 	    type_to_string(ds_attr.type),
-	    Ld(ds_attr.b_size),
-	    Ld(ds_attr.k_size));
+	    lld(ds_attr.b_size),
+	    lld(ds_attr.k_size));
 
     if (print_keyvals) {
 	ret = print_dspace_keyvals(coll_id, handle,
@@ -406,7 +406,7 @@ static void print_datafile_handles(PVFS_
 {
     int i;
 
-    for (i = 0; i < count && i < 10; i++) fprintf(stdout, "0x%08Lx ", Lu(h_p[i]));
+    for (i = 0; i < count && i < 10; i++) fprintf(stdout, "0x%08llx ", llu(h_p[i]));
 
     if (i == 10) fprintf(stdout, "...\n");
     else fprintf(stdout, "\n");
@@ -442,21 +442,21 @@ static int print_keyval_pair(TROVE_keyva
     }
     else if (type == PVFS_TYPE_DIRECTORY && !strncmp(key_p->buffer, "dir_ent", 8)) {
 	fprintf(stdout,
-		"\t\t'%s' (%d): '%s' (%d) as a handle = 0x%08Lx\n",
+		"\t\t'%s' (%d): '%s' (%d) as a handle = 0x%08llx\n",
 		(char *) key_p->buffer,
 		key_p->read_sz,
 		(char *) val_p->buffer,
 		val_p->read_sz,
-		Lu(*(TROVE_handle *) val_p->buffer));
+		llu(*(TROVE_handle *) val_p->buffer));
     }
     else if (type == PVFS_TYPE_DIRDATA && val_p->read_sz == 8) {
 	fprintf(stdout,
-		"\t\t'%s' (%d): '%s' (%d) as a handle = 0x%08Lx\n",
+		"\t\t'%s' (%d): '%s' (%d) as a handle = 0x%08llx\n",
 		(char *) key_p->buffer,
 		key_p->read_sz,
 		(char *) val_p->buffer,
 		val_p->read_sz,
-		Lu(*(TROVE_handle *) val_p->buffer));
+		llu(*(TROVE_handle *) val_p->buffer));
     }
     else if (key_printable && val_printable) {
 	fprintf(stdout,

Index: pvfs2-stat.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-stat.c,v
diff -p -u -r1.2 -r1.3
--- pvfs2-stat.c	5 Oct 2005 17:31:19 -0000	1.2
+++ pvfs2-stat.c	10 Nov 2005 01:26:57 -0000	1.3
@@ -382,7 +382,7 @@ void print_stats(const PVFS_object_ref *
    fprintf(stdout, "  File Name     : %s\n",  pszName);
    fprintf(stdout, "  Relative Name : %s\n",  pszRelativeName);
    fprintf(stdout, "  fs ID         : %d\n",  ref->fs_id);
-   fprintf(stdout, "  Handle        : %Lu\n", Lu(ref->handle));
+   fprintf(stdout, "  Handle        : %llu\n", llu(ref->handle));
    fprintf(stdout, "  Mask          : %o\n",  attr->mask);
    if(attr->mask & PVFS_ATTR_SYS_PERM)
    {
@@ -423,7 +423,7 @@ void print_stats(const PVFS_object_ref *
       }
       else
       {
-         fprintf(stdout, "  Size          : %Ld\n",      Ld(attr->size));
+         fprintf(stdout, "  Size          : %lld\n",      lld(attr->size));
       }
 
    }
@@ -445,19 +445,19 @@ void print_stats(const PVFS_object_ref *
    {
       sprintf(a_time, "%s", ctime((const time_t *)&(attr)->atime));
       a_time[strlen(a_time)-1] = 0;
-      fprintf(stdout, "  atime         : %Lu (%s)\n", Lu(attr->atime), a_time);
+      fprintf(stdout, "  atime         : %llu (%s)\n", llu(attr->atime), a_time);
    }
    if(attr->mask & PVFS_ATTR_SYS_MTIME)
    {
       sprintf(m_time, "%s", ctime((const time_t *)&(attr)->mtime));
       m_time[strlen(m_time)-1] = 0;
-      fprintf(stdout, "  mtime         : %Lu (%s)\n", Lu(attr->mtime), m_time);
+      fprintf(stdout, "  mtime         : %llu (%s)\n", llu(attr->mtime), m_time);
    }
    if(attr->mask & PVFS_ATTR_SYS_CTIME)
    {
       sprintf(c_time, "%s", ctime((const time_t *)&(attr)->ctime));
       c_time[strlen(c_time)-1] = 0;
-      fprintf(stdout, "  ctime         : %Lu (%s)\n", Lu(attr->ctime), c_time);
+      fprintf(stdout, "  ctime         : %llu (%s)\n", llu(attr->ctime), c_time);
    }
    
    /* dfile_count is only valid for a file. For a given file, it tells how many
@@ -472,7 +472,7 @@ void print_stats(const PVFS_object_ref *
    if( (attr->mask & PVFS_ATTR_SYS_DIRENT_COUNT) &&
        (attr->mask & PVFS_TYPE_DIRECTORY))
    {
-      fprintf(stdout, "  dir entries   : %Lu\n", Lu(attr->dirent_count));
+      fprintf(stdout, "  dir entries   : %llu\n", llu(attr->dirent_count));
    }
    
 }

Index: pvfs2-statfs.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-statfs.c,v
diff -p -u -r1.28 -r1.29
--- pvfs2-statfs.c	12 Oct 2004 20:37:34 -0000	1.28
+++ pvfs2-statfs.c	10 Nov 2005 01:26:57 -0000	1.29
@@ -94,10 +94,10 @@ int main(int argc, char **argv)
     printf("\tfs_id: %d\n", (int)resp_statfs.statfs_buf.fs_id);
     printf("\ttotal number of servers (meta and I/O): %d\n", 
         resp_statfs.server_count);
-    printf("\thandles available (meta and I/O):       %Lu\n",
-           Lu(resp_statfs.statfs_buf.handles_available_count));
-    printf("\thandles total (meta and I/O):           %Lu\n",
-           Lu(resp_statfs.statfs_buf.handles_total_count));
+    printf("\thandles available (meta and I/O):       %llu\n",
+           llu(resp_statfs.statfs_buf.handles_available_count));
+    printf("\thandles total (meta and I/O):           %llu\n",
+           llu(resp_statfs.statfs_buf.handles_total_count));
 
     if (user_opts->human_readable)
     {
@@ -115,10 +115,10 @@ int main(int argc, char **argv)
     }
     else
     {
-        printf("\tbytes available:                        %Lu\n",
-               Lu(resp_statfs.statfs_buf.bytes_available));
-        printf("\tbytes total:                            %Lu\n",
-               Lu(resp_statfs.statfs_buf.bytes_total));
+        printf("\tbytes available:                        %llu\n",
+               llu(resp_statfs.statfs_buf.bytes_available));
+        printf("\tbytes total:                            %llu\n",
+               llu(resp_statfs.statfs_buf.bytes_total));
     }
     printf("\nNOTE: The aggregate total and available statistics "
            "are calculated based\n");
@@ -186,22 +186,22 @@ int main(int argc, char **argv)
                 }
                 else
                 {
-                    printf("\tRAM bytes total  : %Lu\n",
-                           Lu(stat_array[i].ram_total_bytes));
-                    printf("\tRAM bytes free   : %Lu\n",
-                           Lu(stat_array[i].ram_free_bytes));
-                    printf("\tuptime (seconds) : %Lu\n",
-                           Lu(stat_array[i].uptime_seconds));
+                    printf("\tRAM bytes total  : %llu\n",
+                           llu(stat_array[i].ram_total_bytes));
+                    printf("\tRAM bytes free   : %llu\n",
+                           llu(stat_array[i].ram_free_bytes));
+                    printf("\tuptime (seconds) : %llu\n",
+                           llu(stat_array[i].uptime_seconds));
                 }
 
-                printf("\tload averages    : %Lu %Lu %Lu\n",
-                       Lu(stat_array[i].load_1),
-                       Lu(stat_array[i].load_5),
-                       Lu(stat_array[i].load_15));
-                printf("\thandles available: %Lu\n",
-                       Lu(stat_array[i].handles_available_count));
-                printf("\thandles total    : %Lu\n",
-                       Lu(stat_array[i].handles_total_count));
+                printf("\tload averages    : %llu %llu %llu\n",
+                       llu(stat_array[i].load_1),
+                       llu(stat_array[i].load_5),
+                       llu(stat_array[i].load_15));
+                printf("\thandles available: %llu\n",
+                       llu(stat_array[i].handles_available_count));
+                printf("\thandles total    : %llu\n",
+                       llu(stat_array[i].handles_total_count));
 
                 if (user_opts->human_readable)
                 {
@@ -219,10 +219,10 @@ int main(int argc, char **argv)
                 }
                 else
                 {
-                    printf("\tbytes available  : %Lu\n",
-                           Lu(stat_array[i].bytes_available));
-                    printf("\tbytes total      : %Lu\n",
-                           Lu(stat_array[i].bytes_total));
+                    printf("\tbytes available  : %llu\n",
+                           llu(stat_array[i].bytes_available));
+                    printf("\tbytes total      : %llu\n",
+                           llu(stat_array[i].bytes_total));
                 }
 
                 if ((stat_array[i].server_type & PVFS_MGMT_IO_SERVER) &&



More information about the PVFS2-CVS mailing list