Changeset 432a269 in mainline for uspace/app


Ignore:
Timestamp:
2011-09-16T21:13:57Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a11f17
Parents:
c0e53ff (diff), fd07e526 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Location:
uspace/app
Files:
231 added
12 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/Makefile

    rc0e53ff r432a269  
    5151        cmds/modules/unmount/unmount.c \
    5252        cmds/modules/kcon/kcon.c \
     53        cmds/builtins/batch/batch.c \
    5354        cmds/builtins/exit/exit.c \
    5455        cmds/builtins/cd/cd.c \
  • uspace/app/bdsh/cmds/builtins/builtins.h

    rc0e53ff r432a269  
    44#include "config.h"
    55
     6#include "batch/entry.h"
    67#include "cd/entry.h"
    78#include "exit/entry.h"
    89
    910builtin_t builtins[] = {
     11#include "batch/batch_def.h"
    1012#include "cd/cd_def.h"
    1113#include "exit/exit_def.h"
  • uspace/app/bdsh/cmds/modules/cat/cat.c

    rc0e53ff r432a269  
    103103{
    104104        console_set_pos(console, 0, console_rows-1);
    105         console_set_color(console, COLOR_BLUE, COLOR_WHITE, 0);
     105        console_set_color(console, COLOR_WHITE, COLOR_BLUE, 0);
    106106       
    107107        printf("ENTER/SPACE/PAGE DOWN - next page, "
  • uspace/app/bdsh/cmds/modules/rm/rm.c

    rc0e53ff r432a269  
    9595        if (NULL != rm->cwd)
    9696                free(rm->cwd);
    97 
    98         return;
    9997}
    10098
     
    129127                }
    130128        }
     129
     130        closedir(dirp);
    131131       
    132132        return ret;
  • uspace/app/bdsh/exec.c

    rc0e53ff r432a269  
    134134                printf("%s: Failed waiting for command (%s)\n", progname,
    135135                    str_error(rc));
     136                return 1;
    136137        } else if (texit != TASK_EXIT_NORMAL) {
    137138                printf("%s: Command failed (unexpectedly terminated)\n", progname);
     139                return 1;
    138140        } else if (retval != 0) {
    139141                printf("%s: Command failed (exit code %d)\n",
    140142                    progname, retval);
     143                return 1;
    141144        }
    142145
  • uspace/app/bdsh/input.c

    rc0e53ff r432a269  
    196196                new_iostate.stdout = to;
    197197        }
    198        
     198
    199199        rc = run_command(cmd, usr, &new_iostate);
    200200       
  • uspace/app/init/init.c

    rc0e53ff r432a269  
    196196}
    197197
    198 static void console(const char *svc)
    199 {
    200         printf("%s: Spawning %s %s\n", NAME, SRV_CONSOLE, svc);
     198static void console(const char *isvc, const char *fbsvc)
     199{
     200        printf("%s: Spawning %s %s %s\n", NAME, SRV_CONSOLE, isvc, fbsvc);
    201201       
    202202        /* Wait for the input service to be ready */
    203203        service_id_t service_id;
    204         int rc = loc_service_get_id(svc, &service_id, IPC_FLAG_BLOCKING);
    205         if (rc != EOK) {
    206                 printf("%s: Error waiting on %s (%s)\n", NAME, svc,
    207                     str_error(rc));
    208                 return;
    209         }
    210        
    211         rc = task_spawnl(NULL, SRV_CONSOLE, SRV_CONSOLE, svc, NULL);
    212         if (rc != EOK) {
    213                 printf("%s: Error spawning %s %s (%s)\n", NAME, SRV_CONSOLE,
    214                     svc, str_error(rc));
     204        int rc = loc_service_get_id(isvc, &service_id, IPC_FLAG_BLOCKING);
     205        if (rc != EOK) {
     206                printf("%s: Error waiting on %s (%s)\n", NAME, isvc,
     207                    str_error(rc));
     208                return;
     209        }
     210       
     211        /* Wait for the framebuffer service to be ready */
     212        rc = loc_service_get_id(fbsvc, &service_id, IPC_FLAG_BLOCKING);
     213        if (rc != EOK) {
     214                printf("%s: Error waiting on %s (%s)\n", NAME, fbsvc,
     215                    str_error(rc));
     216                return;
     217        }
     218       
     219        rc = task_spawnl(NULL, SRV_CONSOLE, SRV_CONSOLE, isvc, fbsvc, NULL);
     220        if (rc != EOK) {
     221                printf("%s: Error spawning %s %s %s (%s)\n", NAME, SRV_CONSOLE,
     222                    isvc, fbsvc, str_error(rc));
    215223        }
    216224}
     
    300308        spawn("/srv/fb");
    301309        spawn("/srv/input");
    302         console("hid/input");
     310        console("hid/input", "hid/fb0");
    303311       
    304312        spawn("/srv/clip");
  • uspace/app/tester/console/console1.c

    rc0e53ff r432a269  
    7676                        for (i = COLOR_BLACK; i <= COLOR_WHITE; i++) {
    7777                                console_flush(console);
    78                                 console_set_color(console, i, COLOR_WHITE,
     78                                console_set_color(console, COLOR_WHITE, i,
    7979                                    j ? CATTR_BRIGHT : 0);
    8080                                printf(" %s ", color_name[i]);
     
    8989                        for (i = COLOR_BLACK; i <= COLOR_WHITE; i++) {
    9090                                console_flush(console);
    91                                 console_set_color(console, COLOR_WHITE, i,
     91                                console_set_color(console, i, COLOR_WHITE,
    9292                                    j ? CATTR_BRIGHT : 0);
    9393                                printf(" %s ", color_name[i]);
     
    102102                for (i = 0; i < 255; i += 16) {
    103103                        console_flush(console);
    104                         console_set_rgb_color(console, (255 - i) << 16, i << 16);
     104                        console_set_rgb_color(console, i << 16, (255 - i) << 16);
    105105                        putchar('X');
    106106                }
    107107                console_flush(console);
    108                 console_set_color(console, COLOR_BLACK, COLOR_WHITE, 0);
     108                console_set_color(console, COLOR_WHITE, COLOR_BLACK, 0);
    109109                putchar('\n');
    110110               
    111111                for (i = 0; i < 255; i += 16) {
    112112                        console_flush(console);
    113                         console_set_rgb_color(console, (255 - i) << 8, i << 8);
     113                        console_set_rgb_color(console, i << 8, (255 - i) << 8);
    114114                        putchar('X');
    115115                }
    116116                console_flush(console);
    117                 console_set_color(console, COLOR_BLACK, COLOR_WHITE, 0);
     117                console_set_color(console, COLOR_WHITE, COLOR_BLACK, 0);
    118118                putchar('\n');
    119119               
    120120                for (i = 0; i < 255; i += 16) {
    121121                        console_flush(console);
    122                         console_set_rgb_color(console, 255 - i, i);
     122                        console_set_rgb_color(console, i, 255 - i);
    123123                        putchar('X');
    124124                }
  • uspace/app/tetris/screen.c

    rc0e53ff r432a269  
    9595{
    9696        console_flush(console);
    97         console_set_rgb_color(console, 0xffffff,
    98             use_color ? color : 0x000000);
     97        console_set_rgb_color(console, use_color ? color : 0x000000,
     98            0xffffff);
    9999}
    100100
     
    153153                return false;
    154154       
    155         return (ccap >= CONSOLE_CCAP_RGB);
     155        return ((ccap & CONSOLE_CAP_RGB) == CONSOLE_CAP_RGB);
    156156}
    157157
  • uspace/app/tetris/shapes.c

    rc0e53ff r432a269  
    6969
    7070const struct shape shapes[] = {
    71         /*  0 */  {  7,  7, { TL, TC, MR }, 0xff042d},
    72         /*  1 */  {  8,  8, { TC, TR, ML }, 0xff9304},
    73         /*  2 */  {  9, 11, { ML, MR, BC }, 0xbeff04},
    74         /*  3 */  {  3,  3, { TL, TC, ML }, 0x63ff04},
    75         /*  4 */  { 12, 14, { ML, BL, MR }, 0xce04ff},
    76         /*  5 */  { 15, 17, { ML, BR, MR }, 0xff04cf},
    77         /*  6 */  { 18, 18, { ML, MR, 2  }, 0x7604ff},  /* sticks out */
    78         /*  7 */  {  0,  0, { TC, ML, BL }, 0xff042d},
    79         /*  8 */  {  1,  1, { TC, MR, BR }, 0xff9304},
    80         /*  9 */  { 10,  2, { TC, MR, BC }, 0xbeff04},
    81         /* 10 */  { 11,  9, { TC, ML, MR }, 0xbeff04},
    82         /* 11 */  {  2, 10, { TC, ML, BC }, 0xbeff04},
    83         /* 12 */  { 13,  4, { TC, BC, BR }, 0xce04ff},
    84         /* 13 */  { 14, 12, { TR, ML, MR }, 0xce04ff},
    85         /* 14 */  {  4, 13, { TL, TC, BC }, 0xce04ff},
    86         /* 15 */  { 16,  5, { TR, TC, BC }, 0xff04cf},
    87         /* 16 */  { 17, 15, { TL, MR, ML }, 0xff04cf},
    88         /* 17 */  {  5, 16, { TC, BC, BL }, 0xff04cf},
    89         /* 18 */  {  6,  6, { TC, BC, 2 * B_COLS }, 0x7604ff}  /* sticks out */
     71        /*  0 */  {  7,  7, { TL, TC, MR }, 0x00aaaa},
     72        /*  1 */  {  8,  8, { TC, TR, ML }, 0x00aa00},
     73        /*  2 */  {  9, 11, { ML, MR, BC }, 0xaa5500},
     74        /*  3 */  {  3,  3, { TL, TC, ML }, 0x0000aa},
     75        /*  4 */  { 12, 14, { ML, BL, MR }, 0xaa00aa},
     76        /*  5 */  { 15, 17, { ML, BR, MR }, 0xffa500},
     77        /*  6 */  { 18, 18, { ML, MR, 2  }, 0xaa0000},  /* sticks out */
     78        /*  7 */  {  0,  0, { TC, ML, BL }, 0x00aaaa},
     79        /*  8 */  {  1,  1, { TC, MR, BR }, 0x00aa00},
     80        /*  9 */  { 10,  2, { TC, MR, BC }, 0xaa5500},
     81        /* 10 */  { 11,  9, { TC, ML, MR }, 0xaa5500},
     82        /* 11 */  {  2, 10, { TC, ML, BC }, 0xaa5500},
     83        /* 12 */  { 13,  4, { TC, BC, BR }, 0xaa00aa},
     84        /* 13 */  { 14, 12, { TR, ML, MR }, 0xaa00aa},
     85        /* 14 */  {  4, 13, { TL, TC, BC }, 0xaa00aa},
     86        /* 15 */  { 16,  5, { TR, TC, BC }, 0xffa500},
     87        /* 16 */  { 17, 15, { TL, MR, ML }, 0xffa500},
     88        /* 17 */  {  5, 16, { TC, BC, BL }, 0xffa500},
     89        /* 18 */  {  6,  6, { TC, BC, 2 * B_COLS }, 0xaa0000}  /* sticks out */
    9090};
    9191
  • uspace/app/tetris/tetris.c

    rc0e53ff r432a269  
    291291                for (j = i + 1; j <= 5; j++) {
    292292                        if (keys[i] == keys[j])
    293                                 errx(1, "duplicate command keys specified.");
     293                                errx(1, "%s", "duplicate command keys specified.");
    294294                }
    295295               
  • uspace/app/trace/trace.c

    rc0e53ff r432a269  
    8686void thread_trace_start(uintptr_t thread_hash);
    8787
    88 static proto_t *proto_console;
    8988static task_id_t task_id;
    9089static loader_t *task_ldr;
     
    659658        ipcp_init();
    660659
    661         /*
    662          * User apps now typically have console on phone 3.
    663          * (Phones 1 and 2 are used by the loader).
    664          */
    665         ipcp_connection_set(3, 0, proto_console);
    666 
    667660        rc = get_thread_list();
    668661        if (rc < 0) {
     
    714707                        fibril_mutex_unlock(&state_lock);
    715708                        printf("Resume...\n");
     709                        break;
     710                default:
    716711                        break;
    717712                }
     
    790785
    791786        proto_register(SERVICE_VFS, p);
    792 
    793 #if 0
    794         p = proto_new("console");
    795 
    796         o = oper_new("write", 1, arg_def, V_ERRNO, 1, resp_def);
    797         proto_add_oper(p, VFS_IN_WRITE, o);
    798 
    799         resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER;
    800         resp_def[2] = V_INTEGER; resp_def[3] = V_CHAR;
    801         o = oper_new("getkey", 0, arg_def, V_ERRNO, 4, resp_def);
    802 
    803         arg_def[0] = V_CHAR;
    804         o = oper_new("clear", 0, arg_def, V_VOID, 0, resp_def);
    805         proto_add_oper(p, CONSOLE_CLEAR, o);
    806 
    807         arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER;
    808         o = oper_new("goto", 2, arg_def, V_VOID, 0, resp_def);
    809         proto_add_oper(p, CONSOLE_GOTO, o);
    810 
    811         resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER;
    812         o = oper_new("getsize", 0, arg_def, V_INTEGER, 2, resp_def);
    813         proto_add_oper(p, CONSOLE_GET_SIZE, o);
    814 
    815         arg_def[0] = V_INTEGER;
    816         o = oper_new("set_style", 1, arg_def, V_VOID, 0, resp_def);
    817         proto_add_oper(p, CONSOLE_SET_STYLE, o);
    818         arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER; arg_def[2] = V_INTEGER;
    819         o = oper_new("set_color", 3, arg_def, V_VOID, 0, resp_def);
    820         proto_add_oper(p, CONSOLE_SET_COLOR, o);
    821         arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER;
    822         o = oper_new("set_rgb_color", 2, arg_def, V_VOID, 0, resp_def);
    823         proto_add_oper(p, CONSOLE_SET_RGB_COLOR, o);
    824         o = oper_new("cursor_visibility", 1, arg_def, V_VOID, 0, resp_def);
    825         proto_add_oper(p, CONSOLE_CURSOR_VISIBILITY, o);
    826 
    827         proto_console = p;
    828         proto_register(SERVICE_CONSOLE, p);
    829 #endif
    830787}
    831788
Note: See TracChangeset for help on using the changeset viewer.