Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 28ed0d9 in mainline for uspace/lib/label/src/label.c


Ignore:
Timestamp:
2015-06-27T19:50:12Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
78d50bd
Parents:
22fb7ab
Message:

VBD client API, liblabel API, pass partition creation/deletion through to VBD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/label/src/label.c

    r22fb7ab r28ed0d9  
    3434 */
    3535
     36#include <errno.h>
     37#include <label.h>
     38#include <mem.h>
     39#include <stdlib.h>
     40
     41int label_open(service_id_t sid, label_t **rlabel)
     42{
     43        label_t *label;
     44
     45        label = calloc(1, sizeof(label_t));
     46        if (label == NULL)
     47                return ENOMEM;
     48
     49        *rlabel = label;
     50        return EOK;
     51}
     52
     53int label_create(service_id_t sid, label_type_t ltype, label_t **rlabel)
     54{
     55        label_t *label;
     56
     57        label = calloc(1, sizeof(label_t));
     58        if (label == NULL)
     59                return ENOMEM;
     60
     61        *rlabel = label;
     62        return EOK;
     63}
     64
     65void label_close(label_t *label)
     66{
     67        free(label);
     68}
     69
     70int label_destroy(label_t *label)
     71{
     72        free(label);
     73        return EOK;
     74}
     75
     76int label_get_info(label_t *label, label_info_t *linfo)
     77{
     78        memset(linfo, 0, sizeof(label_info_t));
     79        linfo->dcnt = dc_empty;
     80        return EOK;
     81}
     82
     83label_part_t *label_part_first(label_t *label)
     84{
     85        return NULL;
     86}
     87
     88label_part_t *label_part_next(label_part_t *oart)
     89{
     90        return NULL;
     91}
     92
     93
     94int label_part_create(label_t *label, label_part_spec_t *pspec,
     95    label_part_t **rpart)
     96{
     97        return ENOTSUP;
     98}
     99
     100int label_part_destroy(label_part_t *part)
     101{
     102        return EOK;
     103}
     104
     105void label_pspec_init(label_part_spec_t *pspec)
     106{
     107        memset(pspec, 0, sizeof(label_part_spec_t));
     108}
     109
    36110/** @}
    37111 */
Note: See TracChangeset for help on using the changeset viewer.