Changeset 0ecfc62 in mainline for uspace/lib/c


Ignore:
Timestamp:
2015-10-09T18:11:08Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a43785
Parents:
372df8f
Message:

Information structures need updating to new model.

Location:
uspace/lib/c
Files:
3 edited

Legend:

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

    r372df8f r0ecfc62  
    192192{
    193193        async_exch_t *exch;
    194         sysarg_t dcnt, ltype, flags;
    195         int retval;
     194        sysarg_t retval;
     195        ipc_call_t answer;
    196196
    197197        exch = async_exchange_begin(vol->sess);
    198         retval = async_req_1_3(exch, VOL_PART_INFO, sid, &dcnt, &ltype,
    199             &flags);
     198        aid_t req = async_send_1(exch, VOL_PART_INFO, sid, &answer);
     199        int rc = async_data_read_start(exch, vinfo, sizeof(vol_part_info_t));
    200200        async_exchange_end(exch);
    201201
     202        if (rc != EOK) {
     203                async_forget(req);
     204                return EIO;
     205        }
     206
     207        async_wait_for(req, &retval);
    202208        if (retval != EOK)
    203209                return EIO;
    204210
    205         vinfo->dcnt = (label_disk_cnt_t)dcnt;
    206         vinfo->ltype = (label_type_t)ltype;
    207         vinfo->flags = (label_flags_t)flags;
    208211        return EOK;
    209212}
  • uspace/lib/c/include/types/label.h

    r372df8f r0ecfc62  
    3838#include <types/uuid.h>
    3939
    40 /** Disk contents */
     40/** Partition contents */
    4141typedef enum {
    42         /** Disk is considered empty */
    43         dc_empty = 0,
    44         /** Disk contains a recognized label */
    45         dc_label,
    46         /** Disk contains a recognized filesystem */
    47         dc_fs,
    48         /** Disk contains unrecognized data */
    49         dc_unknown
    50 } label_disk_cnt_t;
     42        /** Partition is considered empty */
     43        ptc_empty = 0,
     44        /** Partition contains a recognized filesystem */
     45        ptc_fs,
     46        /** Partition contains unrecognized data */
     47        ptc_unknown
     48} label_part_cnt_t;
    5149
    5250/** Disk label type */
  • uspace/lib/c/include/vol.h

    r372df8f r0ecfc62  
    4747} vol_t;
    4848
     49typedef enum {
     50        /** Partition is empty */
     51        vpc_empty,
     52        /** Partition contains a recognized filesystem */
     53        vpc_fs,
     54        /** Partition contains unrecognized data */
     55        vpc_unknown
     56} vol_part_cnt_t;
     57
     58/** File system type */
     59typedef enum {
     60        fs_exfat,
     61        fs_fat,
     62        fs_minix,
     63        fs_ext4
     64} vol_fstype_t;
     65
    4966/** Partition information */
    5067typedef struct {
    51         /** Partition contents */
    52         label_disk_cnt_t dcnt;
    53         /** Label type, if partition contents is label XXX */
    54         label_type_t ltype;
    55         /** Label flags */
    56         label_flags_t flags;
     68        /** Partition content type */
     69        vol_part_cnt_t pcnt;
     70        /** Filesystem type */
     71        vol_fstype_t fstype;
    5772} vol_part_info_t;
    5873
Note: See TracChangeset for help on using the changeset viewer.