Changeset b4ca0a9c in mainline for uspace/app


Ignore:
Timestamp:
2012-07-10T11:53:50Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1e01a35
Parents:
a33706e (diff), 33fc3ae (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:
6 added
12 edited

Legend:

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

    ra33706e rb4ca0a9c  
    4444#define MAX_NAME_LENGTH 1024
    4545
     46char name[MAX_NAME_LENGTH];
     47char drv_name[MAX_NAME_LENGTH];
     48
    4649static int fun_subtree_print(devman_handle_t funh, int lvl)
    4750{
    48         char name[MAX_NAME_LENGTH];
    4951        devman_handle_t devh;
    5052        devman_handle_t *cfuns;
     
    5759
    5860        rc = devman_fun_get_name(funh, name, MAX_NAME_LENGTH);
    59         if (rc != EOK) {
    60                 str_cpy(name, MAX_NAME_LENGTH, "unknown");
    61                 return ENOMEM;
    62         }
     61        if (rc != EOK)
     62                return ELIMIT;
    6363
    6464        if (name[0] == '\0')
    6565                str_cpy(name, MAX_NAME_LENGTH, "/");
    6666
    67         printf("%s (%" PRIun ")\n", name, funh);
     67        rc = devman_fun_get_driver_name(funh, drv_name, MAX_NAME_LENGTH);
     68        if (rc != EOK && rc != EINVAL)
     69                return ELIMIT;
     70
     71        if (rc == EINVAL)
     72                printf("%s\n", name);
     73        else
     74                printf("%s : %s\n", name, drv_name);
    6875
    6976        rc = devman_fun_get_child(funh, &devh);
  • uspace/app/killall/killall.c

    ra33706e rb4ca0a9c  
    3636#include <errno.h>
    3737#include <stdio.h>
     38#include <unistd.h>
    3839#include <task.h>
    3940#include <stats.h>
  • uspace/app/loc/loc.c

    ra33706e rb4ca0a9c  
    4848        size_t svc_cnt;
    4949        char *svc_name;
     50        char *server_name;
    5051        int rc;
    5152        size_t j;
    5253
    53         printf("%s (%" PRIun "):\n", cat_name, cat_id);
     54        printf("%s:\n", cat_name);
    5455
    5556        rc = loc_category_get_svcs(cat_id, &svc_ids, &svc_cnt);
     
    6768                        continue;
    6869                }
    69                 printf("\t%s (%" PRIun ")\n", svc_name, svc_ids[j]);
     70
     71                rc = loc_service_get_server_name(svc_ids[j], &server_name);
     72                if (rc != EOK && rc != EINVAL) {
     73                        free(svc_name);
     74                        printf(NAME ": Unknown service name (SID %"
     75                            PRIun ").\n", svc_ids[j]);
     76                        continue;
     77                }
     78
     79                if (rc == EOK)
     80                        printf("\t%s : %s\n", svc_name, server_name);
     81                else
     82                        printf("\t%s\n", svc_name);
     83       
    7084                free(svc_name);
     85                free(server_name);
    7186        }
    7287
  • uspace/app/nettest1/nettest1.c

    ra33706e rb4ca0a9c  
    4040#include <malloc.h>
    4141#include <stdio.h>
     42#include <unistd.h>
    4243#include <str.h>
    4344#include <task.h>
  • uspace/app/nettest2/nettest2.c

    ra33706e rb4ca0a9c  
    4040#include <malloc.h>
    4141#include <stdio.h>
     42#include <unistd.h>
    4243#include <str.h>
    4344#include <task.h>
  • uspace/app/sbi/src/mytypes.h

    ra33706e rb4ca0a9c  
    5151/** Error return codes. */
    5252#include <errno.h>
     53/** We need NULL defined. */
     54#include <unistd.h>
    5355#define EOK 0
    5456
  • uspace/app/sysinfo/sysinfo.c

    ra33706e rb4ca0a9c  
    3636#include <errno.h>
    3737#include <stdio.h>
     38#include <unistd.h>
    3839#include <sysinfo.h>
    3940#include <malloc.h>
  • uspace/app/tester/hw/misc/virtchar1.c

    ra33706e rb4ca0a9c  
    4848#include "../../tester.h"
    4949
    50 #define DEVICE_PATH_NORMAL "/loc/devices/\\virt\\null\\a"
    51 #define BUFFER_SIZE 64
     50#define DEVICE_PATH_NORMAL  "/loc/devices/\\virt\\null\\a"
     51
     52#define BUFFER_SIZE  64
    5253
    5354static const char *test_virtchar1_internal(const char *path)
     
    6566       
    6667        TPRINTF("   ...file handle %d\n", fd);
    67 
     68       
    6869        TPRINTF(" Asking for session...\n");
    6970        async_sess_t *sess = fd_session(EXCHANGE_SERIALIZE, fd);
     
    9697
    9798const char *test_virtchar1(void)
    98 {;
    99         const char *res;
    100 
    101         res = test_virtchar1_internal(DEVICE_PATH_NORMAL);
    102         if (res != NULL) {
     99{
     100        const char *res = test_virtchar1_internal(DEVICE_PATH_NORMAL);
     101        if (res != NULL)
    103102                return res;
    104         }
    105 
     103       
    106104        return NULL;
    107105}
  • uspace/app/tester/mm/common.c

    ra33706e rb4ca0a9c  
    342342        link_initialize(&area->link);
    343343       
    344         area->addr = as_area_create((void *) -1, size,
     344        area->addr = as_area_create(AS_AREA_ANY, size,
    345345            AS_AREA_WRITE | AS_AREA_READ);
    346         if (area->addr == (void *) -1) {
     346        if (area->addr == AS_MAP_FAILED) {
    347347                free(area);
    348348                check_consistency("map_area (a)");
  • uspace/app/tester/mm/mapping1.c

    ra33706e rb4ca0a9c  
    4242        TPRINTF("Creating AS area...\n");
    4343       
    44         void *result = as_area_create((void *) -1, size,
     44        void *result = as_area_create(AS_AREA_ANY, size,
    4545            AS_AREA_READ | AS_AREA_WRITE);
    46         if (result == (void *) -1)
     46        if (result == AS_MAP_FAILED)
    4747                return NULL;
    4848       
  • uspace/app/trace/proto.h

    ra33706e rb4ca0a9c  
    4444typedef struct {
    4545        const char *name;
    46 
     46       
    4747        int argc;
    4848        val_type_t arg_type[OPER_MAX_ARGS];
    49 
     49       
    5050        val_type_t rv_type;
    51 
     51       
    5252        int respc;
    5353        val_type_t resp_type[OPER_MAX_ARGS];
     
    5757        /** Protocol name */
    5858        const char *name;
    59 
     59       
    6060        /** Maps method number to operation */
    6161        hash_table_t method_oper;
     
    6565extern hash_table_t srv_proto;
    6666
    67 void proto_init(void);
    68 void proto_cleanup(void);
     67extern void proto_init(void);
     68extern void proto_cleanup(void);
    6969
    70 void proto_register(int srv, proto_t *proto);
    71 proto_t *proto_get_by_srv(int srv);
    72 proto_t *proto_new(const char *name);
    73 void proto_delete(proto_t *proto);
    74 void proto_add_oper(proto_t *proto, int method, oper_t *oper);
    75 oper_t *proto_get_oper(proto_t *proto, int method);
     70extern void proto_register(int, proto_t *);
     71extern proto_t *proto_get_by_srv(int);
     72extern proto_t *proto_new(const char *);
     73extern void proto_delete(proto_t *);
     74extern void proto_add_oper(proto_t *, int, oper_t *);
     75extern oper_t *proto_get_oper(proto_t *, int);
    7676
    77 oper_t *oper_new(const char *name, int argc, val_type_t *arg_types,
    78     val_type_t rv_type, int respc, val_type_t *resp_types);
    79 
    80 
     77extern oper_t *oper_new(const char *, int, val_type_t *, val_type_t, int,
     78    val_type_t *);
    8179
    8280#endif
  • uspace/app/websrv/websrv.c

    ra33706e rb4ca0a9c  
    3636#include <bool.h>
    3737#include <errno.h>
     38#include <assert.h>
    3839#include <stdio.h>
    3940#include <sys/types.h>
Note: See TracChangeset for help on using the changeset viewer.