Changeset 1090b8c in mainline for uspace/lib/libc/generic/vfs/vfs.c
- Timestamp:
- 2009-05-18T19:45:17Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c00589d
- Parents:
- c5747fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/vfs/vfs.c
rc5747fe r1090b8c 49 49 #include <errno.h> 50 50 #include <string.h> 51 #include < ipc/devmap.h>51 #include <devmap.h> 52 52 #include "../../../srv/vfs/vfs.h" 53 53 … … 116 116 } 117 117 118 static int device_get_handle(const char *name, dev_handle_t *handle,119 const unsigned int flags)120 {121 int phone;122 123 if (flags & IPC_FLAG_BLOCKING)124 phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, 0);125 else126 phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, 0);127 128 if (phone < 0)129 return phone;130 131 ipc_call_t answer;132 aid_t req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, flags, 0,133 &answer);134 135 ipcarg_t retval = ipc_data_write_start(phone, name, str_size(name) + 1);136 137 if (retval != EOK) {138 async_wait_for(req, NULL);139 ipc_hangup(phone);140 return retval;141 }142 143 async_wait_for(req, &retval);144 145 if (handle != NULL)146 *handle = -1;147 148 if (retval == EOK) {149 if (handle != NULL)150 *handle = (dev_handle_t) IPC_GET_ARG1(answer);151 }152 153 ipc_hangup(phone);154 return retval;155 }156 157 118 int mount(const char *fs_name, const char *mp, const char *dev, 158 const char *opts, constunsigned int flags)119 const char *opts, unsigned int flags) 159 120 { 160 121 int res; … … 163 124 dev_handle_t dev_handle; 164 125 165 res = dev ice_get_handle(dev, &dev_handle, flags);126 res = devmap_device_get_handle(dev, &dev_handle, flags); 166 127 if (res != EOK) 167 128 return res;
Note:
See TracChangeset
for help on using the changeset viewer.