Changeset 48b8928 in mainline


Ignore:
Timestamp:
2024-07-21T21:15:31Z (3 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
145d4e2e
Parents:
f32f89a
Message:

Prevent failure when deleting a partition that is not mounted.

File:
1 edited

Legend:

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

    rf32f89a r48b8928  
    11/*
    2  * Copyright (c) 2015 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    636636
    637637        if (part->cur_mp == NULL) {
    638                 log_msg(LOG_DEFAULT, LVL_DEBUG, "Attempt to mount unmounted "
    639                     "partition.");
    640                 return EINVAL;
     638                /* Partition is not mounted, nothing to do. */
     639                log_msg(LOG_DEFAULT, LVL_DEBUG, "Partition not mounted, "
     640                    "nothing to do.");
     641                goto done;
    641642        }
    642643
     
    659660        part->cur_mp = NULL;
    660661        part->cur_mp_auto = false;
    661 
     662done:
    662663        return EOK;
    663664}
Note: See TracChangeset for help on using the changeset viewer.