Changes in / [9c2d19d:5b0a3946] in mainline


Ignore:
Location:
uspace
Files:
14 edited

Legend:

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

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

    r9c2d19d r5b0a3946  
    4242#include <async.h>
    4343#include <ipc/services.h>
    44 #include <loc.h>
     44#include <ipc/devman.h>
     45#include <devman.h>
    4546#include <device/char_dev.h>
    4647#include <str.h>
     
    7071                }
    7172       
    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);
     73        devman_handle_t handle;
     74        int res = devman_fun_get_handle("/hw/pci0/00:01.0/com1/a", &handle,
     75            IPC_FLAG_BLOCKING);
    7576        if (res != EOK)
    76                 return "Failed getting serial port service ID";
    77        
    78         async_sess_t *sess = loc_service_connect(EXCHANGE_SERIALIZE, svc_id,
     77                return "Could not get serial device handle";
     78       
     79        async_sess_t *sess = devman_device_connect(EXCHANGE_SERIALIZE, handle,
    7980            IPC_FLAG_BLOCKING);
    8081        if (!sess)
    81                 return "Failed connecting to serial device";
     82                return "Unable to connect to serial device";
    8283       
    8384        char *buf = (char *) malloc(cnt + 1);
    8485        if (buf == NULL) {
    8586                async_hangup(sess);
    86                 return "Failed allocating input buffer";
     87                return "Failed to allocate input buffer";
    8788        }
    8889       
     
    111112                free(buf);
    112113                async_hangup(sess);
    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);
     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);
    118119       
    119120        size_t total = 0;
     
    129130                        free(buf);
    130131                        async_hangup(sess);
    131                         return "Failed reading from serial device";
     132                        return "Failed read from serial device";
    132133                }
    133134               
     
    164165                                free(buf);
    165166                                async_hangup(sess);
    166                                 return "Failed writing to serial device";
     167                                return "Failed write to serial device";
    167168                        }
    168169                       
  • uspace/drv/bus/isa/isa.c

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

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

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

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

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

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

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

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

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

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

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

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