misc - Cleaning up warnings that occur on travis
authorJohn Hodge <[email protected]>
Wed, 18 Feb 2015 06:21:05 +0000 (14:21 +0800)
committerJohn Hodge <[email protected]>
Wed, 18 Feb 2015 06:23:01 +0000 (14:23 +0800)
KernelLand/Kernel/include/vfs_ext.h
KernelLand/Kernel/vfs/acls.c
Tools/NetTest_Runner/test_tcp.c

index 42d9865..73d82ce 100644 (file)
@@ -70,6 +70,10 @@ enum eVFS_SeekDirs
  * \}
  */
 
+#define VFS_ACLENT_ALL 0x7FFFFFFF
+#define VFS_GROUP_ANY  {1, VFS_ACLENT_ALL}     //!< Rules for all users
+#define VFS_USER_NOBODY        {0, VFS_ACLENT_ALL}     //!< Rules for nobody
+
 /**
  * \brief MMap protection flags
  * \{
index 7ae50c2..f8d4860 100644 (file)
@@ -9,21 +9,20 @@
 Uint   VFS_int_CheckACLs(tVFS_ACL *ACLs, int Num, int bDeny, Uint Perms, tUID UID, tGID GID);
 
 // === GLOBALS ===
-tVFS_ACL       gVFS_ACL_EveryoneRWX = { {1,-1}, {0,VFS_PERM_ALL} };
-tVFS_ACL       gVFS_ACL_EveryoneRW = { {1,-1}, {0,VFS_PERM_ALL^VFS_PERM_EXEC} };
-tVFS_ACL       gVFS_ACL_EveryoneRX = { {1,-1}, {0,VFS_PERM_READ|VFS_PERM_EXEC} };
-tVFS_ACL       gVFS_ACL_EveryoneRO = { {1,-1}, {0,VFS_PERM_READ} };
+tVFS_ACL       gVFS_ACL_EveryoneRWX = { VFS_GROUP_ANY, {0,VFS_PERM_ALL} };
+tVFS_ACL       gVFS_ACL_EveryoneRW  = { VFS_GROUP_ANY, {0,VFS_PERM_ALL^VFS_PERM_EXEC} };
+tVFS_ACL       gVFS_ACL_EveryoneRX  = { VFS_GROUP_ANY, {0,VFS_PERM_READ|VFS_PERM_EXEC} };
+tVFS_ACL       gVFS_ACL_EveryoneRO  = { VFS_GROUP_ANY, {0,VFS_PERM_READ} };
 
 // === CODE ===
 Uint VFS_int_CheckACLs(tVFS_ACL *ACLs, int Num, int bDeny, Uint Perms, tUID UID, tGID GID)
 {
-        int    i;
-       for(i = 0; i < Num; i ++ )
+       for(int i = 0; i < Num; i ++ )
        {
                if(ACLs[i].Perm.Inv)
                        continue;       // Ignore ALLOWs
                // Check if the entry applies to this case
-               if(ACLs[i].Ent.ID != 0x7FFFFFFF)
+               if(ACLs[i].Ent.ID != VFS_ACLENT_ALL)
                {
                        if(!ACLs[i].Ent.Group) {
                                if(ACLs[i].Ent.ID != UID)       continue;
@@ -95,7 +94,7 @@ int VFS_GetACL(int FD, tVFS_ACL *Dest)
        // Root can do anything
        if(Dest->Ent.Group == 0 && Dest->Ent.ID == 0) {
                Dest->Perm.Inv = 0;
-               Dest->Perm.Perms = -1;
+               Dest->Perm.Perms = VFS_PERM_ALL;
                return 1;
        }
        
@@ -149,7 +148,7 @@ tVFS_ACL *VFS_UnixToAcessACL(Uint Mode, Uint Owner, Uint Group)
        if(Mode & 0010) ret[1].Perm.Perms |= VFS_PERM_EXEC;
        
        // Global
-       ret[2].Ent.Group = 1; ret[2].Ent.ID = -1;
+       ret[2].Ent.Group = 1; ret[2].Ent.ID = VFS_ACLENT_ALL;
        ret[2].Perm.Inv = 0;  ret[2].Perm.Perms = 0;
        if(Mode & 0004) ret[2].Perm.Perms |= VFS_PERM_READ;
        if(Mode & 0002) ret[2].Perm.Perms |= VFS_PERM_WRITE;
index 42aa2d5..8515f7f 100644 (file)
@@ -19,9 +19,9 @@
 static const int       ERX_TIMEOUT = 1000;     // Expect RX timeout (timeout=failure)
 static const int       NRX_TIMEOUT = 250;      // Not expect RX timeout (timeout=success)
 static const int       RETX_TIMEOUT = 1000;    // OS PARAM - Retransmit timeout
-static const int       LOST_TIMEOUT = 1000;    // OS PARAM - Time before sending an ACK 
-static const int       DACK_TIMEOUT = 500;     // OS PARAM - Timeout for delayed ACKs
-static const size_t    DACK_BYTES = 4096;      // OS PARAM - Threshold for delayed ACKs
+//static const int     LOST_TIMEOUT = 1000;    // OS PARAM - Time before sending an ACK 
+//static const int     DACK_TIMEOUT = 500;     // OS PARAM - Timeout for delayed ACKs
+//static const size_t  DACK_BYTES = 4096;      // OS PARAM - Threshold for delayed ACKs
 
 bool Test_TCP_Basic(void)
 {

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