Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 92413de in mainline


Ignore:
Timestamp:
2010-02-25T21:56:24Z (12 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master
Children:
c16cf62
Parents:
729fa2d6
Message:

fixed a bug (devman)

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/devman.c

    r729fa2d6 r92413de  
    8888        aid_t req = async_send_2(phone, DEVMAN_DRIVER_REGISTER, 0, 0, &answer);
    8989       
    90         printf("devman_driver_register (\"%s\", conn)", name);
    9190        ipcarg_t retval = async_data_write_start(phone, name, str_size(name));
    9291        if (retval != EOK) {
  • uspace/srv/devman/devman.c

    r729fa2d6 r92413de  
    4343 */
    4444driver_t * create_driver()
    45 {
    46         printf(NAME ": create_driver\n");
    47        
     45{       
    4846        driver_t *res = malloc(sizeof(driver_t));
    4947        if(res != NULL) {
  • uspace/srv/devman/devman.h

    r729fa2d6 r92413de  
    199199static inline void init_driver(driver_t *drv)
    200200{
    201         printf(NAME ": init_driver\n");
    202201        assert(drv != NULL);
    203202
     
    210209static inline void clean_driver(driver_t *drv)
    211210{
    212         printf(NAME ": clean_driver\n");
    213211        assert(drv != NULL);
    214212
     
    223221static inline void delete_driver(driver_t *drv)
    224222{
    225         printf(NAME ": delete_driver\n");
    226223        assert(NULL != drv);
    227224       
  • uspace/srv/devman/main.c

    r729fa2d6 r92413de  
    101101        }
    102102       
    103         char drv_name[DEVMAN_NAME_MAXLEN];
     103        char *drv_name = NULL;
    104104       
    105105        // Get driver name
    106         int rc = async_string_receive(drv_name, DEVMAN_NAME_MAXLEN, NULL);     
     106        int rc = async_string_receive(&drv_name, DEVMAN_NAME_MAXLEN, NULL);     
    107107        if (rc != EOK) {
    108108                ipc_answer_0(iid, rc);
     
    113113        // Find driver structure
    114114        driver = find_driver(&drivers_list, drv_name);
     115       
     116        free(drv_name);
     117        drv_name = NULL;
     118       
    115119        if (NULL == driver) {
    116120                printf(NAME ": no driver named %s was found.\n", drv_name);
Note: See TracChangeset for help on using the changeset viewer.