Changeset 9c2d19d in mainline
- Timestamp:
- 2012-04-04T19:17:31Z (13 years ago)
- 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. - Location:
- uspace
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sportdmp/sportdmp.c
r5b0a3946 r9c2d19d 27 27 */ 28 28 29 #include <device/char_dev.h> 29 30 #include <errno.h> 31 #include <ipc/serial_ctl.h> 32 #include <loc.h> 30 33 #include <stdio.h> 31 #include <devman.h>32 #include <ipc/devman.h>33 #include <device/char_dev.h>34 #include <ipc/serial_ctl.h>35 34 36 35 #define BUF_SIZE 1 37 36 38 static void syntax_print() { 39 fprintf(stderr, "Usage: sportdmp <baud> <device_path>\n"); 37 static void syntax_print(void) 38 { 39 fprintf(stderr, "Usage: sportdmp <baud> <device_service>\n"); 40 40 } 41 41 42 42 int main(int argc, char **argv) 43 43 { 44 const char* devpath = "/hw/pci0/00:01.0/com1/a";44 const char* svc_path = "devices/\\hw\\pci0\\00:01.0\\com1\\a"; 45 45 sysarg_t baud = 9600; 46 46 … … 56 56 57 57 if (argc > 2) { 58 devpath = argv[2];58 svc_path = argv[2]; 59 59 } 60 60 … … 64 64 } 65 65 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); 68 68 if (rc != EOK) { 69 fprintf(stderr, "Cannot open device %s\n", devpath);69 fprintf(stderr, "Cannot find device service %s\n", svc_path); 70 70 return 1; 71 71 } 72 72 73 async_sess_t *sess = devman_device_connect(EXCHANGE_SERIALIZE, device,73 async_sess_t *sess = loc_service_connect(EXCHANGE_SERIALIZE, svc_id, 74 74 IPC_FLAG_BLOCKING); 75 75 if (!sess) { 76 fprintf(stderr, " Cannot connect device\n");76 fprintf(stderr, "Failed connecting to service %s\n", svc_path); 77 77 } 78 78 … … 83 83 84 84 if (rc != EOK) { 85 fprintf(stderr, " Cannot setserial properties\n");85 fprintf(stderr, "Failed setting serial properties\n"); 86 86 return 2; 87 87 } … … 89 89 uint8_t *buf = (uint8_t *) malloc(BUF_SIZE); 90 90 if (buf == NULL) { 91 fprintf(stderr, " Cannot allocatebuffer\n");91 fprintf(stderr, "Failed allocating buffer\n"); 92 92 return 3; 93 93 } -
uspace/app/tester/hw/serial/serial1.c
r5b0a3946 r9c2d19d 42 42 #include <async.h> 43 43 #include <ipc/services.h> 44 #include <ipc/devman.h> 45 #include <devman.h> 44 #include <loc.h> 46 45 #include <device/char_dev.h> 47 46 #include <str.h> … … 71 70 } 72 71 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); 76 75 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, 80 79 IPC_FLAG_BLOCKING); 81 80 if (!sess) 82 return " Unable to connectto serial device";81 return "Failed connecting to serial device"; 83 82 84 83 char *buf = (char *) malloc(cnt + 1); 85 84 if (buf == NULL) { 86 85 async_hangup(sess); 87 return "Failed to allocateinput buffer";86 return "Failed allocating input buffer"; 88 87 } 89 88 … … 112 111 free(buf); 113 112 async_hangup(sess); 114 return "Failed to setserial 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); 119 118 120 119 size_t total = 0; … … 130 129 free(buf); 131 130 async_hangup(sess); 132 return "Failed read from serial device";131 return "Failed reading from serial device"; 133 132 } 134 133 … … 165 164 free(buf); 166 165 async_hangup(sess); 167 return "Failed writ eto serial device";166 return "Failed writing to serial device"; 168 167 } 169 168 -
uspace/drv/bus/isa/isa.c
r5b0a3946 r9c2d19d 66 66 #include <ops/hw_res.h> 67 67 68 #include <devman.h>69 #include <ipc/devman.h>70 68 #include <device/hw_res.h> 71 69 -
uspace/drv/bus/usb/uhcirh/port.c
r5b0a3946 r9c2d19d 37 37 #include <str_error.h> 38 38 #include <async.h> 39 #include <devman.h>40 39 41 40 #include <usb/usb.h> /* usb_address_t */ -
uspace/drv/bus/usb/usbhub/port.c
r5b0a3946 r9c2d19d 35 35 36 36 #include <bool.h> 37 #include <devman.h>38 37 #include <errno.h> 39 38 #include <str_error.h> -
uspace/drv/char/ps2mouse/main.c
r5b0a3946 r9c2d19d 35 35 #include <libarch/inttypes.h> 36 36 #include <ddf/driver.h> 37 #include <devman.h>38 37 #include <device/hw_res_parsed.h> 39 38 #include <errno.h> -
uspace/drv/char/xtkbd/main.c
r5b0a3946 r9c2d19d 35 35 #include <libarch/inttypes.h> 36 36 #include <ddf/driver.h> 37 #include <devman.h>38 37 #include <device/hw_res_parsed.h> 39 38 #include <errno.h> -
uspace/drv/infrastructure/root/root.c
r5b0a3946 r9c2d19d 53 53 #include <ddf/driver.h> 54 54 #include <ddf/log.h> 55 #include <devman.h>56 #include <ipc/devman.h>57 55 58 56 #define NAME "root" -
uspace/drv/infrastructure/rootpc/rootpc.c
r5b0a3946 r9c2d19d 48 48 #include <ddf/driver.h> 49 49 #include <ddf/log.h> 50 #include <devman.h>51 #include <ipc/devman.h>52 50 #include <ipc/dev_iface.h> 53 51 #include <ops/hw_res.h> -
uspace/drv/nic/e1k/e1k.c
r5b0a3946 r9c2d19d 46 46 #include <ddf/log.h> 47 47 #include <ddf/interrupt.h> 48 #include <devman.h>49 48 #include <device/hw_res_parsed.h> 50 49 #include <device/pci.h> -
uspace/lib/net/generic/net_remote.c
r5b0a3946 r9c2d19d 40 40 #include <malloc.h> 41 41 #include <async.h> 42 #include <devman.h>43 42 #include <generic.h> 44 43 #include <net/modules.h> -
uspace/lib/usb/src/ddfiface.c
r5b0a3946 r9c2d19d 33 33 * Implementations of DDF interfaces functions (actual implementation). 34 34 */ 35 #include <ipc/devman.h>36 35 #include <devman.h> 37 36 #include <async.h> -
uspace/lib/usbvirt/src/ipc_dev.c
r5b0a3946 r9c2d19d 38 38 #include <assert.h> 39 39 #include <async.h> 40 #include <devman.h>41 40 #include <usbvirt/device.h> 42 41 #include <usbvirt/ipc.h> -
uspace/lib/usbvirt/src/ipc_hc.c
r5b0a3946 r9c2d19d 38 38 #include <assert.h> 39 39 #include <async.h> 40 #include <devman.h>41 40 #include <usbvirt/device.h> 42 41 #include <usbvirt/ipc.h>
Note:
See TracChangeset
for help on using the changeset viewer.