Changes in uspace/lib/c/generic/vfs/vfs.c [286286c:27b76ca] in mainline
- File:
-
- 1 edited
-
uspace/lib/c/generic/vfs/vfs.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/vfs.c
r286286c r27b76ca 51 51 #include <assert.h> 52 52 #include <str.h> 53 #include < loc.h>53 #include <devmap.h> 54 54 #include <ipc/vfs.h> 55 #include <ipc/ loc.h>55 #include <ipc/devmap.h> 56 56 57 57 static FIBRIL_MUTEX_INITIALIZE(vfs_mutex); … … 142 142 } 143 143 144 int mount(const char *fs_name, const char *mp, const char *fq sn,145 const char *opts, unsigned int flags , unsigned int instance)144 int mount(const char *fs_name, const char *mp, const char *fqdn, 145 const char *opts, unsigned int flags) 146 146 { 147 147 int null_id = -1; 148 char null[ LOC_NAME_MAXLEN];149 150 if (str_cmp(fq sn, "") == 0) {148 char null[DEVMAP_NAME_MAXLEN]; 149 150 if (str_cmp(fqdn, "") == 0) { 151 151 /* No device specified, create a fresh 152 152 null/%d device instead */ 153 null_id = loc_null_create();153 null_id = devmap_null_create(); 154 154 155 155 if (null_id == -1) 156 156 return ENOMEM; 157 157 158 snprintf(null, LOC_NAME_MAXLEN, "null/%d", null_id);159 fq sn = null;160 } 161 162 service_id_t service_id;163 int res = loc_service_get_id(fqsn, &service_id, flags);158 snprintf(null, DEVMAP_NAME_MAXLEN, "null/%d", null_id); 159 fqdn = null; 160 } 161 162 devmap_handle_t devmap_handle; 163 int res = devmap_device_get_handle(fqdn, &devmap_handle, flags); 164 164 if (res != EOK) { 165 165 if (null_id != -1) 166 loc_null_destroy(null_id);166 devmap_null_destroy(null_id); 167 167 168 168 return res; … … 173 173 if (!mpa) { 174 174 if (null_id != -1) 175 loc_null_destroy(null_id);175 devmap_null_destroy(null_id); 176 176 177 177 return ENOMEM; … … 181 181 182 182 sysarg_t rc_orig; 183 aid_t req = async_send_3(exch, VFS_IN_MOUNT, service_id, flags, 184 instance, NULL); 183 aid_t req = async_send_2(exch, VFS_IN_MOUNT, devmap_handle, flags, NULL); 185 184 sysarg_t rc = async_data_write_start(exch, (void *) mpa, mpa_size); 186 185 if (rc != EOK) { … … 190 189 191 190 if (null_id != -1) 192 loc_null_destroy(null_id);191 devmap_null_destroy(null_id); 193 192 194 193 if (rc_orig == EOK) … … 205 204 206 205 if (null_id != -1) 207 loc_null_destroy(null_id);206 devmap_null_destroy(null_id); 208 207 209 208 if (rc_orig == EOK) … … 220 219 221 220 if (null_id != -1) 222 loc_null_destroy(null_id);221 devmap_null_destroy(null_id); 223 222 224 223 if (rc_orig == EOK) … … 236 235 237 236 if (null_id != -1) 238 loc_null_destroy(null_id);237 devmap_null_destroy(null_id); 239 238 240 239 if (rc_orig == EOK) … … 249 248 250 249 if ((rc != EOK) && (null_id != -1)) 251 loc_null_destroy(null_id);250 devmap_null_destroy(null_id); 252 251 253 252 return (int) rc; … … 655 654 async_exch_t *exch = vfs_exchange_begin(); 656 655 657 req = async_send_ 1(exch, VFS_IN_UNLINK, lflag, NULL);656 req = async_send_0(exch, VFS_IN_UNLINK, NULL); 658 657 rc = async_data_write_start(exch, pa, pa_size); 659 658 if (rc != EOK) { … … 793 792 } 794 793 795 if (!stat. service) {794 if (!stat.device) { 796 795 errno = ENOENT; 797 796 return NULL; 798 797 } 799 798 800 return loc_service_connect(mgmt, stat.service, 0);799 return devmap_device_connect(mgmt, stat.device, 0); 801 800 } 802 801
Note:
See TracChangeset
for help on using the changeset viewer.
