From: John Hodge Date: Wed, 22 May 2013 02:42:54 +0000 (+0800) Subject: Cleaned up some TODOs X-Git-Tag: rel0.15~454 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e5deb25fdad3bf008df40679082abdc999d5d1d9;p=tpg%2Facess2.git Cleaned up some TODOs --- diff --git a/Usermode/Applications/dhcpclient_src/main.c b/Usermode/Applications/dhcpclient_src/main.c index 5b1d3802..858a61d1 100644 --- a/Usermode/Applications/dhcpclient_src/main.c +++ b/Usermode/Applications/dhcpclient_src/main.c @@ -90,7 +90,6 @@ int main(int argc, char *argv[]) { tInterface *ifaces = NULL, *i; - // TODO: Scan /Devices and search for network adapters if( argc > 2 ) { fprintf(stderr, "Usage: %s \n", argv[0]); return -1; @@ -131,9 +130,9 @@ int main(int argc, char *argv[]) if(maxfd < i->SocketFD) maxfd = i->SocketFD; } - if( select(maxfd+1, &fds, NULL, NULL, &timeout) < 0 ) + if( _SysSelect(maxfd+1, &fds, NULL, NULL, &timeout, 0) < 0 ) { - // TODO: Check error result + perror("_SysSelect returned error"); return -1; } @@ -207,11 +206,14 @@ int Start_Interface(tInterface *Iface) sprintf(path, "/Devices/ip/adapters/%s", Iface->Adapter); fd = _SysOpen(path, 0); if(fd == -1) { + perror("Opening adapter"); _SysDebug("Unable to open adapter %s", path); return -1; } - _SysIOCtl(fd, 4, Iface->HWAddr); - // TODO: Check if ioctl() failed + if( _SysIOCtl(fd, 4, Iface->HWAddr) ) { + perror("Getting MAC address"); + return -1; + } _SysClose(fd); } diff --git a/Usermode/Applications/gui_shell_src/vt100.c b/Usermode/Applications/gui_shell_src/vt100.c index 2a87ca4f..09a96d9d 100644 --- a/Usermode/Applications/gui_shell_src/vt100.c +++ b/Usermode/Applications/gui_shell_src/vt100.c @@ -67,10 +67,10 @@ int Term_HandleVT100(int Len, const char *Buf) switch( *Buf ) { case '\b': - // TODO: Backspace Display_MoveCursor(-1, 0); Display_AddText(1, " "); Display_MoveCursor(-1, 0); + // TODO: Need to handle \t and ^A-Z return 1; case '\t': // TODO: tab (get current cursor pos, space until multiple of 8) @@ -79,7 +79,6 @@ int Term_HandleVT100(int Len, const char *Buf) Display_Newline(1); return 1; case '\r': - // TODO: Carriage return Display_MoveCursor(INT_MIN, 0); return 1; } @@ -171,7 +170,7 @@ int Term_HandleVT100_Long(int Len, const char *Buffer) { if( args[i] < 8 ) { - // Flags? + // TODO: Flags? } else if( 30 <= args[i] && args[i] <= 37 ) {