File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ int fh_switch(int operation) {
1111}
1212
1313int file_handler_find (char * filename , union FFSFileEntry * entry ) {
14+ // search for filename case insensitive as keyboard driver currently
15+ // doesn't support shift or caps lock.
1416 int file_id = 0 ;
1517 while (file_id < FS_FFS_FILEENTRY_COUNT ) {
1618 int err = fetch_file_entry (
1719 FFS_UNIQUE_PARITION_ID , file_id , entry );
18- if (!err && strcmp (filename , entry -> content .filename )== 0 ) {
20+ if (!err && strcmpi (filename , entry -> content .filename )== 0 ) {
1921 // match
2022 return file_id ;
2123 }
Original file line number Diff line number Diff line change 33#include <string.h>
44
55void process (char filename []) {
6- printf ("file: %s\n" , filename );
7-
86 FILE * handler = fopen (filename , "r" );
97 if (handler == NULL ) {
10- printf ("file open: failed: %s \n" , filename );
8+ printf ("failed to open '%s' file. \n" , filename );
119 return ;
1210 }
13- puts ("content: \n" );
1411 char buffer [80 ];
1512 for (size_t i = 0 ; i < 20 ; i ++ ) {
1613 if (!fgets (buffer , sizeof (buffer ), handler )) {
Original file line number Diff line number Diff line change 44
55QEMU_SCREENSHOT_NAME=" cat_test.ppm"
66
7- python3 -m tests.qemu.monitor -p ${MONITOR_PORT:? } -sc run cat
7+ python3 -m tests.qemu.monitor -p ${MONITOR_PORT:? } -sc run cat readme.md
88
99test_create_screen_dump
1010test_screen_content $LINENO " Experimental OS"
Original file line number Diff line number Diff line change 11QEMU_CODES = {
2- " " : "spc" ,
3- "\n " : "ret"
2+ " " : "spc" ,
3+ "\n " : "ret" ,
4+ "." : "dot" ,
5+ "," : "comma" ,
6+ "-" : "minus" ,
7+ "=" : "equal" ,
8+ "*" : "asterisk"
49}
510
611def char_to_key (char ):
You can’t perform that action at this time.
0 commit comments