Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/vfs/vfs.c

    r286286c r27b76ca  
    5151#include <assert.h>
    5252#include <str.h>
    53 #include <loc.h>
     53#include <devmap.h>
    5454#include <ipc/vfs.h>
    55 #include <ipc/loc.h>
     55#include <ipc/devmap.h>
    5656
    5757static FIBRIL_MUTEX_INITIALIZE(vfs_mutex);
     
    142142}
    143143
    144 int mount(const char *fs_name, const char *mp, const char *fqsn,
    145     const char *opts, unsigned int flags, unsigned int instance)
     144int mount(const char *fs_name, const char *mp, const char *fqdn,
     145    const char *opts, unsigned int flags)
    146146{
    147147        int null_id = -1;
    148         char null[LOC_NAME_MAXLEN];
    149        
    150         if (str_cmp(fqsn, "") == 0) {
     148        char null[DEVMAP_NAME_MAXLEN];
     149       
     150        if (str_cmp(fqdn, "") == 0) {
    151151                /* No device specified, create a fresh
    152152                   null/%d device instead */
    153                 null_id = loc_null_create();
     153                null_id = devmap_null_create();
    154154               
    155155                if (null_id == -1)
    156156                        return ENOMEM;
    157157               
    158                 snprintf(null, LOC_NAME_MAXLEN, "null/%d", null_id);
    159                 fqsn = 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);
    164164        if (res != EOK) {
    165165                if (null_id != -1)
    166                         loc_null_destroy(null_id);
     166                        devmap_null_destroy(null_id);
    167167               
    168168                return res;
     
    173173        if (!mpa) {
    174174                if (null_id != -1)
    175                         loc_null_destroy(null_id);
     175                        devmap_null_destroy(null_id);
    176176               
    177177                return ENOMEM;
     
    181181
    182182        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);
    185184        sysarg_t rc = async_data_write_start(exch, (void *) mpa, mpa_size);
    186185        if (rc != EOK) {
     
    190189               
    191190                if (null_id != -1)
    192                         loc_null_destroy(null_id);
     191                        devmap_null_destroy(null_id);
    193192               
    194193                if (rc_orig == EOK)
     
    205204               
    206205                if (null_id != -1)
    207                         loc_null_destroy(null_id);
     206                        devmap_null_destroy(null_id);
    208207               
    209208                if (rc_orig == EOK)
     
    220219               
    221220                if (null_id != -1)
    222                         loc_null_destroy(null_id);
     221                        devmap_null_destroy(null_id);
    223222               
    224223                if (rc_orig == EOK)
     
    236235               
    237236                if (null_id != -1)
    238                         loc_null_destroy(null_id);
     237                        devmap_null_destroy(null_id);
    239238               
    240239                if (rc_orig == EOK)
     
    249248       
    250249        if ((rc != EOK) && (null_id != -1))
    251                 loc_null_destroy(null_id);
     250                devmap_null_destroy(null_id);
    252251       
    253252        return (int) rc;
     
    655654        async_exch_t *exch = vfs_exchange_begin();
    656655       
    657         req = async_send_1(exch, VFS_IN_UNLINK, lflag, NULL);
     656        req = async_send_0(exch, VFS_IN_UNLINK, NULL);
    658657        rc = async_data_write_start(exch, pa, pa_size);
    659658        if (rc != EOK) {
     
    793792        }
    794793       
    795         if (!stat.service) {
     794        if (!stat.device) {
    796795                errno = ENOENT;
    797796                return NULL;
    798797        }
    799798       
    800         return loc_service_connect(mgmt, stat.service, 0);
     799        return devmap_device_connect(mgmt, stat.device, 0);
    801800}
    802801
Note: See TracChangeset for help on using the changeset viewer.