[Pvfs2-cvs] commit by slang in pvfs2/src/apps/admin: pvfs2-fsck.c pvfs2-ls.c pvfs2-xattr.c

CVS commit program cvs at parl.clemson.edu
Thu Feb 1 21:08:55 EST 2007


Update of /projects/cvsroot/pvfs2/src/apps/admin
In directory parlweb1:/tmp/cvs-serv3158/src/apps/admin

Modified Files:
	pvfs2-fsck.c pvfs2-ls.c pvfs2-xattr.c 
Log Message:
merge 2.6 branch changes to head


Index: pvfs2-fsck.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-fsck.c,v
diff -p -u -r1.21 -r1.22
--- pvfs2-fsck.c	23 Oct 2006 15:22:35 -0000	1.21
+++ pvfs2-fsck.c	2 Feb 2007 02:08:55 -0000	1.22
@@ -434,7 +434,7 @@ int traverse_directory_tree(PVFS_fs_id c
 			    int server_count,
 			    PVFS_credentials *creds)
 {
-    int ret, server_idx;
+    int ret, server_idx = 0;
     PVFS_sysresp_lookup lookup_resp;
     PVFS_sysresp_getattr getattr_resp;
     PVFS_object_ref pref;
@@ -519,7 +519,7 @@ int descend(PVFS_fs_id cur_fs,
     PVFS_ds_position token; 
     PVFS_sysresp_readdir readdir_resp;
     PVFS_sysresp_getattr getattr_resp;
-    PVFS_object_ref entry_ref;
+    PVFS_object_ref entry_ref = {0, 0};
 
     count = 64;
 
@@ -534,7 +534,7 @@ int descend(PVFS_fs_id cur_fs,
 
         for (i = 0; i < readdir_resp.pvfs_dirent_outcount; i++)
         {
-            int server_idx, ret, in_main_list = 0, in_alt_list = 0;
+            int server_idx = 0, ret, in_main_list = 0, in_alt_list = 0;
             char *cur_file;
             PVFS_handle cur_handle;
 
@@ -698,7 +698,7 @@ int verify_datafiles(PVFS_fs_id cur_fs,
 		     int df_count,
 		     PVFS_credentials *creds)
 {
-    int ret, i, server_idx, error = 0;
+    int ret, i, server_idx = 0, error = 0;
     PVFS_handle *df_handles;
 
     df_handles = (PVFS_handle *) malloc(df_count * sizeof(PVFS_handle));

Index: pvfs2-ls.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-ls.c,v
diff -p -u -r1.68 -r1.69
--- pvfs2-ls.c	23 Oct 2006 15:23:18 -0000	1.68
+++ pvfs2-ls.c	2 Feb 2007 02:08:55 -0000	1.69
@@ -424,8 +424,9 @@ int do_list(
     pvfs_dirent_incount = MAX_NUM_DIRENTS;
 
     memset(&getattr_response,0,sizeof(PVFS_sysresp_getattr));
-    if (PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT,
-                         &credentials, &getattr_response) == 0)
+    ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT,
+                           &credentials, &getattr_response);
+    if(ret == 0)
     {
         if ((getattr_response.attr.objtype == PVFS_TYPE_METAFILE) ||
             (getattr_response.attr.objtype == PVFS_TYPE_SYMLINK) ||
@@ -461,6 +462,11 @@ int do_list(
             }
             return 0;
         }
+    }
+    else
+    {
+        PVFS_perror("PVFS_sys_getattr", ret);
+        return -1;
     }
 
     if (do_timing)

Index: pvfs2-xattr.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-xattr.c,v
diff -p -u -r1.2 -r1.3
--- pvfs2-xattr.c	12 Oct 2006 17:07:34 -0000	1.2
+++ pvfs2-xattr.c	2 Feb 2007 02:08:55 -0000	1.3
@@ -416,7 +416,8 @@ static int generic_open(file_object *obj
             return -1;
         }
 
-        if (resp_getattr.attr.objtype != PVFS_TYPE_METAFILE)
+        if (resp_getattr.attr.objtype != PVFS_TYPE_METAFILE &&
+            resp_getattr.attr.objtype != PVFS_TYPE_DIRECTORY)
         {
             fprintf(stderr, "Not a meta file!\n");
             return -1;



More information about the Pvfs2-cvs mailing list