Added debug to VFS_GetACL
authorJohn Hodge <[email protected]>
Fri, 25 Sep 2009 13:45:37 +0000 (21:45 +0800)
committerJohn Hodge <[email protected]>
Fri, 25 Sep 2009 13:45:37 +0000 (21:45 +0800)
Kernel/vfs/acls.c
Usermode/Applications/CLIShell_src/main.c
Usermode/include/acess/sys.h

index 9ef4676..c0225ca 100644 (file)
@@ -64,13 +64,21 @@ int VFS_GetACL(int FD, tVFS_ACL *Dest)
         int    i;
        tVFS_Handle     *h = VFS_GetHandle(FD);
        
+       ENTER("ph pDest", h, Dest);
+       
        // Error check
-       if(!h)  return -1;
+       if(!h) {
+               LEAVE('i', -1);
+               return -1;
+       }
+       
+       LOG("h->Node = %p", h->Node);
        
        // Root can do anything
        if(Dest->Group == 0 && Dest->ID == 0) {
                Dest->Inv = 0;
                Dest->Perms = -1;
+               LEAVE('i', 1);
                return 1;
        }
        
@@ -78,6 +86,7 @@ int VFS_GetACL(int FD, tVFS_ACL *Dest)
        if( h->Node->NumACLs == 0 ) {
                Dest->Inv = 0;
                Dest->Perms = 0;
+               LEAVE('i', 0);
                return 0;
        }
        
@@ -89,11 +98,13 @@ int VFS_GetACL(int FD, tVFS_ACL *Dest)
                
                Dest->Inv = h->Node->ACLs[i].Inv;
                Dest->Perms = h->Node->ACLs[i].Perms;
+               LEAVE('i', 1);
                return 1;
        }
        
        
        Dest->Inv = 0;
        Dest->Perms = 0;
+       LEAVE('i', 0);
        return 0;
 }
index 8786262..04acc14 100644 (file)
@@ -332,7 +332,7 @@ void Command_Cd(int argc, char **argv)
 void Command_Dir(int argc, char **argv)\r
 {\r
         int    dp, fp, dirLen;\r
-       //char  modeStr[11] = "RWXrwxRWX ";\r
+       char    modeStr[11] = "RWXrwxRWX ";\r
        char    tmpPath[1024];\r
        char    *fileName;\r
        t_sysFInfo      info;\r
index 62e145e..f933486 100644 (file)
@@ -26,14 +26,14 @@ struct s_sysACL {
                        unsigned        id:     31;
                };
                uint32_t        object;
-       }
+       };
        union {
                struct {
                        unsigned        invert: 1;
                        unsigned        perms:  31;
                };
                uint32_t        rawperms;
-       }
+       };
 };
 struct s_sysFInfo {
        uint    uid, gid;

UCC git Repository :: git.ucc.asn.au