Changeset 4b6635a7 in mainline for uspace/srv/volsrv/part.c


Ignore:
Timestamp:
2015-10-12T15:42:23Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
edebb4a1
Parents:
6a0db524
Message:

Volsrv empty partition detection.

File:
1 edited

Legend:

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

    r6a0db524 r4b6635a7  
    4343#include <str.h>
    4444
     45#include "empty.h"
    4546#include "part.h"
    4647#include "types/part.h"
     
    130131{
    131132        vol_part_t *part;
     133        bool empty;
    132134        int rc;
    133135
     
    148150
    149151        log_msg(LOG_DEFAULT, LVL_NOTE, "Probe partition %s", part->svc_name);
    150 
    151         part->pcnt = vpc_unknown;
     152        rc = vol_part_is_empty(sid, &empty);
     153        if (rc != EOK) {
     154                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed determining if "
     155                    "partition is empty.");
     156                goto error;
     157        }
     158
     159        part->pcnt = empty ? vpc_empty : vpc_unknown;
    152160        list_append(&part->lparts, &vol_parts);
    153161
Note: See TracChangeset for help on using the changeset viewer.