Cleaned up some TODOs
authorJohn Hodge <[email protected]>
Wed, 22 May 2013 02:42:54 +0000 (10:42 +0800)
committerJohn Hodge <[email protected]>
Wed, 22 May 2013 02:42:54 +0000 (10:42 +0800)
Usermode/Applications/dhcpclient_src/main.c
Usermode/Applications/gui_shell_src/vt100.c

index 5b1d380..858a61d 100644 (file)
@@ -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 <interface>\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);
        }
        
index 2a87ca4..09a96d9 100644 (file)
@@ -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 )
                                        {

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