Changeset 79ae36dd in mainline for uspace/app/bdsh/cmds
- Timestamp:
- 2011-06-08T19:01:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0eff68e
- Parents:
- 764d71e
- Location:
- uspace/app/bdsh/cmds/modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/bdd/bdd.c
r764d71e r79ae36dd 102 102 } 103 103 104 rc = block_init( handle, 2048);104 rc = block_init(EXCHANGE_SERIALIZE, handle, 2048); 105 105 if (rc != EOK) { 106 106 printf("%s: Error initializing libblock.\n", cmdname); -
uspace/app/bdsh/cmds/modules/cat/cat.c
r764d71e r79ae36dd 64 64 static sysarg_t console_rows = 0; 65 65 static bool should_quit = false; 66 67 static console_ctrl_t *console = NULL; 66 68 67 69 static struct option const long_options[] = { … … 102 104 static void waitprompt() 103 105 { 104 console_set_pos(fphone(stdout), 0, console_rows-1); 105 console_set_color(fphone(stdout), COLOR_BLUE, COLOR_WHITE, 0); 106 console_set_pos(console, 0, console_rows-1); 107 console_set_color(console, COLOR_BLUE, COLOR_WHITE, 0); 108 106 109 printf("ENTER/SPACE/PAGE DOWN - next page, " 107 110 "ESC/Q - quit, C - continue unpaged"); 108 111 fflush(stdout); 109 console_set_style(fphone(stdout), STYLE_NORMAL); 112 113 console_set_style(console, STYLE_NORMAL); 110 114 } 111 115 112 116 static void waitkey() 113 117 { 114 console_event_t ev;118 kbd_event_t ev; 115 119 116 120 while (true) { 117 if (!console_get_ event(fphone(stdin), &ev)) {121 if (!console_get_kbd_event(console, &ev)) { 118 122 return; 119 123 } … … 138 142 static void newpage() 139 143 { 140 console_clear( fphone(stdout));144 console_clear(console); 141 145 chars_remaining = console_cols; 142 lines_remaining = console_rows -1;146 lines_remaining = console_rows - 1; 143 147 } 144 148 … … 238 242 console_rows = 0; 239 243 should_quit = false; 244 console = console_init(stdin, stdout); 240 245 241 246 argc = cli_count_args(argv); … … 280 285 281 286 if (more) { 282 rc = console_get_size( fphone(stdout), &cols, &rows);287 rc = console_get_size(console, &cols, &rows); 283 288 if (rc != EOK) { 284 289 printf("%s - cannot get console size\n", cmdname); -
uspace/app/bdsh/cmds/modules/kcon/kcon.c
r764d71e r79ae36dd 32 32 #include <stdlib.h> 33 33 #include <io/console.h> 34 #include <vfs/vfs.h>35 34 #include "config.h" 36 35 #include "util.h" … … 42 41 static const char *cmdname = "kcon"; 43 42 44 /* Disp ayshelp for kcon in various levels */43 /* Display help for kcon in various levels */ 45 44 void help_cmd_kcon(unsigned int level) 46 45 { 47 46 printf("`kcon' switches to the kernel debug console.\n"); 48 49 if (level != HELP_SHORT) { 50 printf("Usage: %s\n", cmdname); 51 } 52 47 48 if (level != HELP_SHORT) 49 printf("Usage: %s\n", cmdname); 50 53 51 return; 54 52 } … … 57 55 int cmd_kcon(char **argv) 58 56 { 59 unsigned int argc; 60 61 argc = cli_count_args(argv); 62 57 unsigned int argc = cli_count_args(argv); 58 63 59 if (argc != 1) { 64 60 printf("%s - incorrect number of arguments. Try `%s --help'\n", 65 61 cmdname, cmdname); 66 62 return CMD_FAILURE; 67 63 } 68 69 console_kcon_enable(fphone(stdout)); 70 71 return CMD_SUCCESS; 64 65 if (console_kcon()) 66 return CMD_SUCCESS; 67 else 68 return CMD_FAILURE; 72 69 } 73
Note:
See TracChangeset
for help on using the changeset viewer.