Changeset 9c2d19d in mainline


Ignore:
Timestamp:
2012-04-04T19:17:31Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3e2952b
Parents:
5b0a3946 (diff), e882e3a (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 with mainline

Location:
uspace
Files:
14 edited

Legend:

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

    r5b0a3946 r9c2d19d  
    2727 */
    2828
     29#include <device/char_dev.h>
    2930#include <errno.h>
     31#include <ipc/serial_ctl.h>
     32#include <loc.h>
    3033#include <stdio.h>
    31 #include <devman.h>
    32 #include <ipc/devman.h>
    33 #include <device/char_dev.h>
    34 #include <ipc/serial_ctl.h>
    3534
    3635#define BUF_SIZE 1
    3736
    38 static void syntax_print() {
    39         fprintf(stderr, "Usage: sportdmp <baud> <device_path>\n");
     37static void syntax_print(void)
     38{
     39        fprintf(stderr, "Usage: sportdmp <baud> <device_service>\n");
    4040}
    4141
    4242int main(int argc, char **argv)
    4343{
    44         const char* devpath = "/hw/pci0/00:01.0/com1/a";
     44        const char* svc_path = "devices/\\hw\\pci0\\00:01.0\\com1\\a";
    4545        sysarg_t baud = 9600;
    4646       
     
    5656       
    5757        if (argc > 2) {
    58                 devpath = argv[2];
     58                svc_path = argv[2];
    5959        }
    6060       
     
    6464        }
    6565       
    66         devman_handle_t device;
    67         int rc = devman_fun_get_handle(devpath, &device, IPC_FLAG_BLOCKING);
     66        service_id_t svc_id;
     67        int rc = loc_service_get_id(svc_path, &svc_id, IPC_FLAG_BLOCKING);
    6868        if (rc != EOK) {
    69                 fprintf(stderr, "Cannot open device %s\n", devpath);
     69                fprintf(stderr, "Cannot find device service %s\n", svc_path);
    7070                return 1;
    7171        }
    7272       
    73         async_sess_t *sess = devman_device_connect(EXCHANGE_SERIALIZE, device,
     73        async_sess_t *sess = loc_service_connect(EXCHANGE_SERIALIZE, svc_id,
    7474            IPC_FLAG_BLOCKING);
    7575        if (!sess) {
    76                 fprintf(stderr, "Cannot connect device\n");
     76                fprintf(stderr, "Failed connecting to service %s\n", svc_path);
    7777        }
    7878       
     
    8383       
    8484        if (rc != EOK) {
    85                 fprintf(stderr, "Cannot set serial properties\n");
     85                fprintf(stderr, "Failed setting serial properties\n");
    8686                return 2;
    8787        }
     
    8989        uint8_t *buf = (uint8_t *) malloc(BUF_SIZE);
    9090        if (buf == NULL) {
    91                 fprintf(stderr, "Cannot allocate buffer\n");
     91                fprintf(stderr, "Failed allocating buffer\n");
    9292                return 3;
    9393        }
  • uspace/app/tester/hw/serial/serial1.c

    r5b0a3946 r9c2d19d  
    4242#include <async.h>
    4343#include <ipc/services.h>
    44 #include <ipc/devman.h>
    45 #include <devman.h>
     44#include <loc.h>
    4645#include <device/char_dev.h>
    4746#include <str.h>
     
    7170                }
    7271       
    73         devman_handle_t handle;
    74         int res = devman_fun_get_handle("/hw/pci0/00:01.0/com1/a", &handle,
    75             IPC_FLAG_BLOCKING);
     72        service_id_t svc_id;
     73        int res = loc_service_get_id("devices/\\hw\\pci0\\00:01.0\\com1\\a",
     74            &svc_id, IPC_FLAG_BLOCKING);
    7675        if (res != EOK)
    77                 return "Could not get serial device handle";
    78        
    79         async_sess_t *sess = devman_device_connect(EXCHANGE_SERIALIZE, handle,
     76                return "Failed getting serial port service ID";
     77       
     78        async_sess_t *sess = loc_service_connect(EXCHANGE_SERIALIZE, svc_id,
    8079            IPC_FLAG_BLOCKING);
    8180        if (!sess)
    82                 return "Unable to connect to serial device";
     81                return "Failed connecting to serial device";
    8382       
    8483        char *buf = (char *) malloc(cnt + 1);
    8584        if (buf == NULL) {
    8685                async_hangup(sess);
    87                 return "Failed to allocate input buffer";
     86                return "Failed allocating input buffer";
    8887        }
    8988       
     
    112111                free(buf);
    113112                async_hangup(sess);
    114                 return "Failed to set serial communication parameters";
    115         }
    116        
    117         TPRINTF("Trying to read %zu characters from serial device "
    118             "(handle=%" PRIun ")\n", cnt, handle);
     113                return "Failed setting serial communication parameters";
     114        }
     115       
     116        TPRINTF("Trying reading %zu characters from serial device "
     117            "(svc_id=%" PRIun ")\n", cnt, svc_id);
    119118       
    120119        size_t total = 0;
     
    130129                        free(buf);
    131130                        async_hangup(sess);
    132                         return "Failed read from serial device";
     131                        return "Failed reading from serial device";
    133132                }
    134133               
     
    165164                                free(buf);
    166165                                async_hangup(sess);
    167                                 return "Failed write to serial device";
     166                                return "Failed writing to serial device";
    168167                        }
    169168                       
  • uspace/drv/bus/isa/isa.c

    r5b0a3946 r9c2d19d  
    6666#include <ops/hw_res.h>
    6767
    68 #include <devman.h>
    69 #include <ipc/devman.h>
    7068#include <device/hw_res.h>
    7169
  • uspace/drv/bus/usb/uhcirh/port.c

    r5b0a3946 r9c2d19d  
    3737#include <str_error.h>
    3838#include <async.h>
    39 #include <devman.h>
    4039
    4140#include <usb/usb.h>    /* usb_address_t */
  • uspace/drv/bus/usb/usbhub/port.c

    r5b0a3946 r9c2d19d  
    3535
    3636#include <bool.h>
    37 #include <devman.h>
    3837#include <errno.h>
    3938#include <str_error.h>
  • uspace/drv/char/ps2mouse/main.c

    r5b0a3946 r9c2d19d  
    3535#include <libarch/inttypes.h>
    3636#include <ddf/driver.h>
    37 #include <devman.h>
    3837#include <device/hw_res_parsed.h>
    3938#include <errno.h>
  • uspace/drv/char/xtkbd/main.c

    r5b0a3946 r9c2d19d  
    3535#include <libarch/inttypes.h>
    3636#include <ddf/driver.h>
    37 #include <devman.h>
    3837#include <device/hw_res_parsed.h>
    3938#include <errno.h>
  • uspace/drv/infrastructure/root/root.c

    r5b0a3946 r9c2d19d  
    5353#include <ddf/driver.h>
    5454#include <ddf/log.h>
    55 #include <devman.h>
    56 #include <ipc/devman.h>
    5755
    5856#define NAME "root"
  • uspace/drv/infrastructure/rootpc/rootpc.c

    r5b0a3946 r9c2d19d  
    4848#include <ddf/driver.h>
    4949#include <ddf/log.h>
    50 #include <devman.h>
    51 #include <ipc/devman.h>
    5250#include <ipc/dev_iface.h>
    5351#include <ops/hw_res.h>
  • uspace/drv/nic/e1k/e1k.c

    r5b0a3946 r9c2d19d  
    4646#include <ddf/log.h>
    4747#include <ddf/interrupt.h>
    48 #include <devman.h>
    4948#include <device/hw_res_parsed.h>
    5049#include <device/pci.h>
  • uspace/lib/net/generic/net_remote.c

    r5b0a3946 r9c2d19d  
    4040#include <malloc.h>
    4141#include <async.h>
    42 #include <devman.h>
    4342#include <generic.h>
    4443#include <net/modules.h>
  • uspace/lib/usb/src/ddfiface.c

    r5b0a3946 r9c2d19d  
    3333 * Implementations of DDF interfaces functions (actual implementation).
    3434 */
    35 #include <ipc/devman.h>
    3635#include <devman.h>
    3736#include <async.h>
  • uspace/lib/usbvirt/src/ipc_dev.c

    r5b0a3946 r9c2d19d  
    3838#include <assert.h>
    3939#include <async.h>
    40 #include <devman.h>
    4140#include <usbvirt/device.h>
    4241#include <usbvirt/ipc.h>
  • uspace/lib/usbvirt/src/ipc_hc.c

    r5b0a3946 r9c2d19d  
    3838#include <assert.h>
    3939#include <async.h>
    40 #include <devman.h>
    4140#include <usbvirt/device.h>
    4241#include <usbvirt/ipc.h>
Note: See TracChangeset for help on using the changeset viewer.