Changeset 19f24fd in mainline for uspace/app


Ignore:
Timestamp:
2010-02-05T22:25:52Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dafa2d04
Parents:
83349b03 (diff), d42976c (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:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/Makefile

    r83349b03 r19f24fd  
    4848        cmds/modules/mv/mv.c \
    4949        cmds/modules/mount/mount.c \
     50        cmds/modules/unmount/unmount.c \
    5051        cmds/modules/kcon/kcon.c \
    5152        cmds/builtins/exit/exit.c \
  • uspace/app/bdsh/cmds/modules/module_aliases.h

    r83349b03 r19f24fd  
    1414char *mod_aliases[] = {
    1515        "ren", "mv",
     16        "umount", "unmount",
    1617        NULL, NULL
    1718};
  • uspace/app/bdsh/cmds/modules/modules.h

    r83349b03 r19f24fd  
    3131#include "mv/entry.h"
    3232#include "mount/entry.h"
     33#include "unmount/entry.h"
    3334#include "kcon/entry.h"
    3435
     
    5152#include "mv/mv_def.h"
    5253#include "mount/mount_def.h"
     54#include "unmount/unmount_def.h"
    5355#include "kcon/kcon_def.h"
    5456
  • uspace/app/init/init.c

    r83349b03 r19f24fd  
    9494static bool mount_devfs(void)
    9595{
    96         char null[MAX_DEVICE_NAME];
    97         int null_id = devmap_null_create();
    98        
    99         if (null_id == -1) {
    100                 printf(NAME ": Unable to create null device\n");
    101                 return false;
    102         }
    103        
    104         snprintf(null, MAX_DEVICE_NAME, "null/%d", null_id);
    105         int rc = mount("devfs", DEVFS_MOUNT_POINT, null, "", IPC_FLAG_BLOCKING);
     96        int rc = mount("devfs", DEVFS_MOUNT_POINT, "", "", IPC_FLAG_BLOCKING);
    10697       
    10798        switch (rc) {
     
    111102        case EBUSY:
    112103                printf(NAME ": Device filesystem already mounted\n");
    113                 devmap_null_destroy(null_id);
    114104                return false;
    115105        case ELIMIT:
    116106                printf(NAME ": Unable to mount device filesystem\n");
    117                 devmap_null_destroy(null_id);
    118107                return false;
    119108        case ENOENT:
    120109                printf(NAME ": Unknown filesystem type (devfs)\n");
    121                 devmap_null_destroy(null_id);
    122110                return false;
    123111        default:
    124112                printf(NAME ": Error mounting device filesystem (%d)\n", rc);
    125                 devmap_null_destroy(null_id);
    126113                return false;
    127114        }
     
    184171{
    185172        char *argv[3];
    186         char hid_in[MAX_DEVICE_NAME];
     173        char hid_in[DEVMAP_NAME_MAXLEN];
    187174        int rc;
    188175       
    189         snprintf(hid_in, MAX_DEVICE_NAME, "%s/%s", DEVFS_MOUNT_POINT, dev);
     176        snprintf(hid_in, DEVMAP_NAME_MAXLEN, "%s/%s", DEVFS_MOUNT_POINT, dev);
    190177       
    191178        printf(NAME ": Spawning %s with %s\n", SRV_CONSOLE, hid_in);
     
    209196{
    210197        char *argv[4];
    211         char term[MAX_DEVICE_NAME];
     198        char term[DEVMAP_NAME_MAXLEN];
    212199        int rc;
    213200       
    214         snprintf(term, MAX_DEVICE_NAME, "%s/%s", DEVFS_MOUNT_POINT, dev);
     201        snprintf(term, DEVMAP_NAME_MAXLEN, "%s/%s", DEVFS_MOUNT_POINT, dev);
    215202       
    216203        printf(NAME ": Spawning %s with %s %s\n", APP_GETTERM, term, app);
     
    287274        spawn("/srv/fhc");
    288275        spawn("/srv/obio");
     276        srv_start("/srv/cuda_adb");
    289277        srv_start("/srv/i8042");
    290         srv_start("/srv/c_mouse");
     278        srv_start("/srv/adb_ms");
     279        srv_start("/srv/char_ms");
    291280
    292281        spawn("/srv/fb");
     
    320309        getterm("term/vc5", "/app/bdsh");
    321310        getterm("term/vc6", "/app/klog");
    322        
     311
    323312        return 0;
    324313}
  • uspace/app/init/init.h

    r83349b03 r19f24fd  
    3939#define NAME  "init"
    4040
    41 #define MAX_DEVICE_NAME  32
    42 
    4341#endif
    4442
  • uspace/app/mkfat/mkfat.c

    r83349b03 r19f24fd  
    4444#include <devmap.h>
    4545#include <byteorder.h>
     46#include <sys/types.h>
     47#include <sys/typefmt.h>
     48#include <inttypes.h>
    4649#include <errno.h>
    4750#include "fat.h"
     
    157160                printf(NAME ": Warning, failed to obtain block device size.\n");
    158161        } else {
    159                 printf(NAME ": Block device has %llu blocks.\n", dev_nblocks);
     162                printf(NAME ": Block device has %" PRIuBN " blocks.\n",
     163                    dev_nblocks);
    160164                cfg.total_sectors = dev_nblocks;
    161165        }
  • uspace/app/taskdump/taskdump.c

    r83349b03 r19f24fd  
    4141#include <task.h>
    4242#include <kernel/mm/as.h>
     43#include <sys/types.h>
     44#include <sys/typefmt.h>
    4345#include <libarch/istate.h>
    4446#include <macros.h>
     
    9395        rc = connect_task(task_id);
    9496        if (rc < 0) {
    95                 printf("Failed connecting to task %lld.\n", task_id);
     97                printf("Failed connecting to task %" PRIdTASKID ".\n", task_id);
    9698                return 1;
    9799        }
     
    100102        app_symtab = NULL;
    101103
    102         printf("Dumping task '%s' (task ID %lld).\n", app_name, task_id);
     104        printf("Dumping task '%s' (task ID %" PRIdTASKID ").\n", app_name, task_id);
    103105        autoload_syms();
    104106        putchar('\n');
     
    134136        if (rc < 0) {
    135137                printf("Error connecting\n");
    136                 printf("ipc_connect_task(%lld) -> %d ", task_id, rc);
     138                printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc);
    137139                return rc;
    138140        }
     
    245247        printf("Threads:\n");
    246248        for (i = 0; i < n_threads; i++) {
    247                 printf(" [%d] hash: 0x%lx\n", 1+i, thash_buf[i]);
     249                printf(" [%d] hash: %p\n", 1+i, thash_buf[i]);
    248250
    249251                thread_dump(thash_buf[i]);
     
    289291        printf("Address space areas:\n");
    290292        for (i = 0; i < n_areas; i++) {
    291                 printf(" [%d] flags: %c%c%c%c base: 0x%lx size: 0x%lx\n", 1+i,
     293                printf(" [%d] flags: %c%c%c%c base: %p size: %p\n", 1+i,
    292294                    (ainfo_buf[i].flags & AS_AREA_READ) ? 'R' : '-',
    293295                    (ainfo_buf[i].flags & AS_AREA_WRITE) ? 'W' : '-',
     
    328330
    329331        sym_pc = fmt_sym_address(pc);
    330         printf("Thread 0x%lx crashed at %s. FP = 0x%lx\n", thash, sym_pc, fp);
     332        printf("Thread %p crashed at %s. FP = %p\n", thash, sym_pc, fp);
    331333        free(sym_pc);
    332334
  • uspace/app/tester/vfs/vfs1.c

    r83349b03 r19f24fd  
    7979        TPRINTF("Created directory %s\n", MOUNT_POINT);
    8080       
    81         char null[MAX_DEVICE_NAME];
    82         int null_id = devmap_null_create();
    83        
    84         if (null_id == -1)
    85                 return "Unable to create null device";
    86        
    87         snprintf(null, MAX_DEVICE_NAME, "null/%d", null_id);
    88         int rc = mount(FS_TYPE, MOUNT_POINT, null, OPTIONS, FLAGS);
     81        int rc = mount(FS_TYPE, MOUNT_POINT, "", OPTIONS, FLAGS);
    8982        switch (rc) {
    9083        case EOK:
    91                 TPRINTF("Mounted /dev/%s as %s on %s\n", null, FS_TYPE, MOUNT_POINT);
     84                TPRINTF("Mounted %s on %s\n", FS_TYPE, MOUNT_POINT);
    9285                break;
    9386        case EBUSY:
  • uspace/app/trace/ipcp.c

    r83349b03 r19f24fd  
    3636#include <stdlib.h>
    3737#include <adt/hash_table.h>
     38#include <sys/typefmt.h>
    3839
    3940#include "ipc_desc.h"
     
    200201
    201202        if ((display_mask & DM_IPC) != 0) {
    202                 printf("Call ID: 0x%lx, phone: %d, proto: %s, method: ", hash,
     203                printf("Call ID: %p, phone: %d, proto: %s, method: ", hash,
    203204                        phone, (proto ? proto->name : "n/a"));
    204205                ipc_m_print(proto, IPC_GET_METHOD(*call));
    205                 printf(" args: (%lu, %lu, %lu, %lu, %lu)\n", args[1], args[2],
     206                printf(" args: (%" PRIuIPCARG ", %" PRIuIPCARG ", %" PRIuIPCARG
     207                    ", %" PRIuIPCARG ", %" PRIuIPCARG ")\n", args[1], args[2],
    206208                    args[3], args[4], args[5]);
    207209        }
     
    279281
    280282        if ((display_mask & DM_IPC) != 0) {
    281                 printf("Response to 0x%lx: retval=%ld, args = (%lu, %lu, %lu, %lu, %lu)\n",
    282                         hash, retval, IPC_GET_ARG1(*answer),
    283                         IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
    284                         IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
     283                printf("Response to %p: retval=%ld, args = (%" PRIuIPCARG
     284                    ", %" PRIuIPCARG ", %" PRIuIPCARG ", %" PRIuIPCARG
     285                    ", %" PRIuIPCARG ")\n",
     286                    hash, retval, IPC_GET_ARG1(*answer),
     287                    IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
     288                    IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
    285289        }
    286290
     
    336340                /* Not a response */
    337341                if ((display_mask & DM_IPC) != 0) {
    338                         printf("Not a response (hash 0x%lx)\n", hash);
     342                        printf("Not a response (hash %p)\n", hash);
    339343                }
    340344                return;
  • uspace/app/trace/trace.c

    r83349b03 r19f24fd  
    4949#include <io/keycode.h>
    5050#include <fibril_synch.h>
     51#include <sys/types.h>
     52#include <sys/typefmt.h>
    5153
    5254#include <libc.h>
     
    159161        if (rc < 0) {
    160162                printf("Error connecting\n");
    161                 printf("ipc_connect_task(%lld) -> %d ", task_id, rc);
     163                printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc);
    162164                return rc;
    163165        }
     
    198200        printf("Threads:");
    199201        for (i = 0; i < n_threads; i++) {
    200                 printf(" [%d] (hash 0x%lx)", 1+i, thread_hash_buf[i]);
     202                printf(" [%d] (hash %p)", 1+i, thread_hash_buf[i]);
    201203        }
    202204        printf("\ntotal of %u threads\n", tb_needed / sizeof(uintptr_t));
     
    222224        case V_HASH:
    223225        case V_PTR:
    224                 printf("0x%08lx", val);
     226                printf("%p", val);
    225227                break;
    226228
     
    275277
    276278        putchar('(');
    277         if (n > 0) printf("%ld", sc_args[0]);
     279        if (n > 0) printf("%" PRIdSYSARG, sc_args[0]);
    278280        for (i = 1; i < n; i++) {
    279                 printf(", %ld", sc_args[i]);
     281                printf(", %" PRIdSYSARG, sc_args[i]);
    280282        }
    281283        putchar(')');
     
    508510        }
    509511
    510         printf("Start tracing thread [%d] (hash 0x%lx).\n", thread_id, thread_hash);
     512        printf("Start tracing thread [%d] (hash %p).\n", thread_id, thread_hash);
    511513
    512514        while (!abort_trace) {
     
    552554                                break;
    553555                        case UDEBUG_EVENT_THREAD_E:
    554                                 printf("Thread 0x%lx exited.\n", val0);
     556                                printf("Thread %p exited.\n", val0);
    555557                                fibril_mutex_lock(&state_lock);
    556558                                abort_trace = true;
     
    972974        rc = connect_task(task_id);
    973975        if (rc < 0) {
    974                 printf("Failed connecting to task %lld.\n", task_id);
     976                printf("Failed connecting to task %" PRIdTASKID ".\n", task_id);
    975977                return 1;
    976978        }
    977979
    978         printf("Connected to task %lld.\n", task_id);
     980        printf("Connected to task %" PRIdTASKID ".\n", task_id);
    979981
    980982        if (task_ldr != NULL)
Note: See TracChangeset for help on using the changeset viewer.