Changeset f0f8787 in mainline for uspace/srv/volsrv/part.c


Ignore:
Timestamp:
2018-10-04T14:53:29Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c5429fe
Parents:
1bb43d5
git-author:
Jiri Svoboda <jiri@…> (2018-10-03 21:51:40)
git-committer:
Jiri Svoboda <jiri@…> (2018-10-04 14:53:29)
Message:

Add vol insert subcommand to re-insert a previously ejected volume.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/volsrv/part.c

    r1bb43d5 rf0f8787  
    602602}
    603603
     604/** Insert volume.
     605 *
     606 * Re-mount the volume in the partition, if applicable.
     607 *
     608 * @param part Partition
     609 */
     610errno_t vol_part_insert_part(vol_part_t *part)
     611{
     612        int rc;
     613
     614        log_msg(LOG_DEFAULT, LVL_DEBUG, "vol_part_insert_part()");
     615
     616        fibril_mutex_lock(&part->parts->lock);
     617
     618        if (part->cur_mp != NULL) {
     619                fibril_mutex_unlock(&part->parts->lock);
     620                return EOK;
     621        }
     622
     623        rc = vol_part_probe(part);
     624        if (rc != EOK)
     625                goto error;
     626
     627        rc = vol_part_mount(part);
     628        if (rc != EOK)
     629                goto error;
     630
     631        fibril_mutex_unlock(&part->parts->lock);
     632
     633        return EOK;
     634error:
     635        return rc;
     636}
     637
    604638/** Set mount point.
    605639 *
Note: See TracChangeset for help on using the changeset viewer.