Changeset d9fae235 in mainline for uspace/app/getterm/getterm.c


Ignore:
Timestamp:
2010-04-17T01:28:38Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9d6bfa5
Parents:
9256ad29
Message:

sysinfo overhaul

  • cleanup (nicer data structures, use of SLAB allocator)
  • add support for storing arbitrary binary data
  • properly reimplement non-constant values (generated by functions)
  • add support for non-constant subtrees (generated by functions)
  • syscall ABI change, libc API change
  • reflect changes in user code

libc: task_spawn() can now return error code

  • reflect change in user code, print error strings after failed task_spawn()

uspace cleanup

  • more use of string and other constants
  • more use of str_error()
  • unify error reporting in init
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/getterm/getterm.c

    r9256ad29 rd9fae235  
    4040#include <stdio.h>
    4141#include <task.h>
     42#include <str_error.h>
    4243#include "version.h"
     44
     45#define APP_NAME  "getterm"
    4346
    4447static void usage(void)
    4548{
    46         printf("Usage: getterm <terminal> <path>\n");
     49        printf("Usage: %s <terminal> <path>\n", APP_NAME);
    4750}
    4851
     
    7679        args[1] = NULL;
    7780       
    78         task_id_t id = task_spawn(fname, args);
     81        int err;
     82        task_id_t id = task_spawn(fname, args, &err);
    7983       
    8084        if (id == 0)
    81                 printf("Error spawning %s\n", fname);
     85                printf("%s: Error spawning %s (%s)\n", APP_NAME, fname,
     86                    str_error(err));
    8287       
    8388        return id;
Note: See TracChangeset for help on using the changeset viewer.