git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3861558
)
Removed debug from VFS_GetACL and VTerm, fixed DevFS not being a directory
author
John Hodge
<
[email protected]
>
Fri, 25 Sep 2009 13:59:55 +0000
(21:59 +0800)
committer
John Hodge
<
[email protected]
>
Fri, 25 Sep 2009 13:59:55 +0000
(21:59 +0800)
Kernel/drv/vterm.c
patch
|
blob
|
history
Kernel/vfs/acls.c
patch
|
blob
|
history
Kernel/vfs/fs/devfs.c
patch
|
blob
|
history
Kernel/vfs/open.c
patch
|
blob
|
history
Usermode/Applications/CLIShell_src/main.c
patch
|
blob
|
history
diff --git
a/Kernel/drv/vterm.c
b/Kernel/drv/vterm.c
index
fef93d8
..
5f013ac
100644
(file)
--- a/
Kernel/drv/vterm.c
+++ b/
Kernel/drv/vterm.c
@@
-62,7
+62,7
@@
void VT_int_UpdateScreen( tVTerm *Term, int UpdateAll );
// === CONSTANTS ===
const Uint16 caVT100Colours[] = {
// === CONSTANTS ===
const Uint16 caVT100Colours[] = {
- VT_COL_BLACK, 0x700, 0x070, 0x770, 0x007, 0x707, 0x077,
VT_COL_LTGREY
,
+ VT_COL_BLACK, 0x700, 0x070, 0x770, 0x007, 0x707, 0x077,
0x777
,
VT_COL_GREY, 0xF00, 0x0F0, 0xFF0, 0x00F, 0xF0F, 0x0FF, VT_COL_WHITE
};
VT_COL_GREY, 0xF00, 0x0F0, 0xFF0, 0x00F, 0xF0F, 0x0FF, VT_COL_WHITE
};
@@
-473,7
+473,6
@@
void VT_int_PutChar(tVTerm *Term, Uint32 Ch)
{
case 0: return; // Ignore NULL byte
case '\n':
{
case 0: return; // Ignore NULL byte
case '\n':
- LOG("%i += %i", Term->WritePos, Term->Width);
Term->WritePos += Term->Width;
case '\r':
Term->WritePos -= Term->WritePos % Term->Width;
Term->WritePos += Term->Width;
case '\r':
Term->WritePos -= Term->WritePos % Term->Width;
diff --git
a/Kernel/vfs/acls.c
b/Kernel/vfs/acls.c
index
c0225ca
..
9c81c38
100644
(file)
--- a/
Kernel/vfs/acls.c
+++ b/
Kernel/vfs/acls.c
@@
-64,21
+64,15
@@
int VFS_GetACL(int FD, tVFS_ACL *Dest)
int i;
tVFS_Handle *h = VFS_GetHandle(FD);
int i;
tVFS_Handle *h = VFS_GetHandle(FD);
- ENTER("ph pDest", h, Dest);
-
// Error check
if(!h) {
// Error check
if(!h) {
- LEAVE('i', -1);
return -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;
// Root can do anything
if(Dest->Group == 0 && Dest->ID == 0) {
Dest->Inv = 0;
Dest->Perms = -1;
- LEAVE('i', 1);
return 1;
}
return 1;
}
@@
-86,7
+80,6
@@
int VFS_GetACL(int FD, tVFS_ACL *Dest)
if( h->Node->NumACLs == 0 ) {
Dest->Inv = 0;
Dest->Perms = 0;
if( h->Node->NumACLs == 0 ) {
Dest->Inv = 0;
Dest->Perms = 0;
- LEAVE('i', 0);
return 0;
}
return 0;
}
@@
-98,13
+91,11
@@
int VFS_GetACL(int FD, tVFS_ACL *Dest)
Dest->Inv = h->Node->ACLs[i].Inv;
Dest->Perms = h->Node->ACLs[i].Perms;
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;
return 1;
}
Dest->Inv = 0;
Dest->Perms = 0;
- LEAVE('i', 0);
return 0;
}
return 0;
}
diff --git
a/Kernel/vfs/fs/devfs.c
b/Kernel/vfs/fs/devfs.c
index
2558509
..
f5f090d
100644
(file)
--- a/
Kernel/vfs/fs/devfs.c
+++ b/
Kernel/vfs/fs/devfs.c
@@
-19,6
+19,7
@@
tVFS_Driver gDevFS_Info = {
};
tVFS_Node gDevFS_RootNode = {
.NumACLs = 1,
};
tVFS_Node gDevFS_RootNode = {
.NumACLs = 1,
+ .Flags = VFS_FFLAG_DIRECTORY,
.ACLs = &gVFS_ACL_EveryoneRW,
.ReadDir = DevFS_ReadDir,
.FindDir = DevFS_FindDir
.ACLs = &gVFS_ACL_EveryoneRW,
.ReadDir = DevFS_ReadDir,
.FindDir = DevFS_FindDir
diff --git
a/Kernel/vfs/open.c
b/Kernel/vfs/open.c
index
64c65db
..
3ac3fa3
100644
(file)
--- a/
Kernel/vfs/open.c
+++ b/
Kernel/vfs/open.c
@@
-392,7
+392,7
@@
int VFS_Open(char *Path, Uint Mode)
if( !(Mode & VFS_OPENFLAG_NOLINK) && (node->Flags & VFS_FFLAG_SYMLINK) )
{
if( !node->Read ) {
if( !(Mode & VFS_OPENFLAG_NOLINK) && (node->Flags & VFS_FFLAG_SYMLINK) )
{
if( !node->Read ) {
-
LOG
("No read method on symlink");
+
Warning
("No read method on symlink");
LEAVE('i', -1);
return -1;
}
LEAVE('i', -1);
return -1;
}
diff --git
a/Usermode/Applications/CLIShell_src/main.c
b/Usermode/Applications/CLIShell_src/main.c
index
f4d703c
..
e806a53
100644
(file)
--- a/
Usermode/Applications/CLIShell_src/main.c
+++ b/
Usermode/Applications/CLIShell_src/main.c
@@
-31,7
+31,7
@@
struct {
\r
// ==== LOCAL VARIABLES ====
\r
char gsCommandBuffer[1024];
\r
\r
// ==== LOCAL VARIABLES ====
\r
char gsCommandBuffer[1024];
\r
-char *gsCurrentDirectory =
"/"
;
\r
+char *gsCurrentDirectory =
NULL
;
\r
char gsTmpBuffer[1024];
\r
char **gasCommandHistory;
\r
int giLastCommand = 0;
\r
char gsTmpBuffer[1024];
\r
char **gasCommandHistory;
\r
int giLastCommand = 0;
\r
@@
-50,8
+50,19
@@
int main(int argc, char *argv[], char *envp[])
\r
//Command_Clear(0, NULL);
\r
\r
\r
//Command_Clear(0, NULL);
\r
\r
+ {
\r
+ char *tmp = getenv("CWD");
\r
+ if(tmp) {
\r
+ gsCurrentDirectory = malloc(strlen(tmp)+1);
\r
+ strcpy(gsCurrentDirectory, tmp);
\r
+ } else {
\r
+ gsCurrentDirectory = malloc(2);
\r
+ strcpy(gsCurrentDirectory, "/");
\r
+ }
\r
+ }
\r
+
\r
write(_stdout, 1, "\n");
\r
write(_stdout, 1, "\n");
\r
- write(_stdout,
36
, "Acess Shell Version 3\n");
\r
+ write(_stdout,
22
, "Acess Shell Version 3\n");
\r
write(_stdout, 2, "\n");
\r
for(;;)
\r
{
\r
write(_stdout, 2, "\n");
\r
for(;;)
\r
{
\r
@@
-59,6
+70,7
@@
int main(int argc, char *argv[], char *envp[])
if(saArgs[0]) free(saArgs);
\r
if(!bCached) free(sCommandStr);
\r
bCached = 0;
\r
if(saArgs[0]) free(saArgs);
\r
if(!bCached) free(sCommandStr);
\r
bCached = 0;
\r
+ write(_stdout, 1, "\n");
\r
write(_stdout, strlen(gsCurrentDirectory), gsCurrentDirectory);
\r
write(_stdout, 3, "$ ");
\r
\r
write(_stdout, strlen(gsCurrentDirectory), gsCurrentDirectory);
\r
write(_stdout, 3, "$ ");
\r
\r
@@
-324,6
+336,8
@@
void Command_Cd(int argc, char **argv)
return;
\r
}
\r
\r
return;
\r
}
\r
\r
+ free(gsCurrentDirectory);
\r
+ gsCurrentDirectory = malloc(strlen(tmpPath)+1);
\r
strcpy(gsCurrentDirectory, tmpPath);
\r
}
\r
\r
strcpy(gsCurrentDirectory, tmpPath);
\r
}
\r
\r
UCC
git Repository :: git.ucc.asn.au