Changeset 63a3276 in mainline for uspace/srv/vfs/vfs_ops.c


Ignore:
Timestamp:
2019-08-06T19:20:35Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
3f05ef7
Parents:
72c8f77
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-06-17 23:02:03)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-06 19:20:35)
Message:

sysman: Instrumented locsrv for autostart

  • also refactored unit name derivation in other brokers
  • exposee creation is not used in unit's lifecycle (failed assertion)

Conflicts:

uspace/lib/c/generic/loc.c
uspace/srv/devman/driver.c
uspace/srv/devman/drv_conn.c
uspace/srv/hid/compositor/compositor.c
uspace/srv/locsrv/locsrv.c
uspace/srv/vfs/vfs.h
uspace/srv/vfs/vfs_ops.c
uspace/srv/vfs/vfs_register.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_ops.c

    r72c8f77 r63a3276  
    136136        fibril_mutex_lock(&fs_list_lock);
    137137        while (true) {
    138                 fs_handle = fs_name_to_handle(instance, fsname, false);
     138                fs_handle = fs_name_to_handle(fsname, instance, false);
    139139                if (!fs_handle) {
    140140                        if ((flags & IPC_FLAG_AUTOSTART)) {
     
    220220        char *unit_name = NULL;
    221221
    222         assert(instance == 0);
    223         /*
    224          * Unit name is made simply by considering service of the same name as
    225          * given FS name.
    226          * TODO instance identifier is not implemented.
    227          */
    228         asprintf(&unit_name, "%s%c%s", fs_name, UNIT_NAME_SEPARATOR,
    229             UNIT_SVC_TYPE_NAME);
    230         if (unit_name == NULL) {
    231                 return ENOMEM;
    232         }
    233 
    234         int rc = sysman_unit_start(unit_name, IPC_FLAG_BLOCKING);
     222        errno_t rc = fs_unit_name(fs_name, instance, &unit_name);
     223        if (rc != EOK) {
     224                return rc;
     225        }
     226
     227        rc = sysman_unit_start(unit_name, IPC_FLAG_BLOCKING);
    235228
    236229        free(unit_name);
     
    246239
    247240        fibril_mutex_lock(&fs_list_lock);
    248         fs_handle = fs_name_to_handle(0, fs_name, false);
     241        fs_handle = fs_name_to_handle(fs_name, 0, false);
    249242        fibril_mutex_unlock(&fs_list_lock);
    250243
Note: See TracChangeset for help on using the changeset viewer.