util
3
HAL Library

# util

## Synopsis

    #define     bswap_16
    #define     bswap_32
    #define     bswap_64
    #define     SB_BUFFER_SIZE
    #define     SEEK_BUFFER_SIZE
    #define     le16_to_cpu                     (x)
    #define     le32_to_cpu                     (x)
    #define     le64_to_cpu                     (x)
    #define     be16_to_cpu                     (x)
    #define     be32_to_cpu                     (x)
    #define     cpu_to_le16                     (x)
    #define     cpu_to_le32                     (x)
    #define     cpu_to_be32                     (x)
    void        volume_id_set_unicode16         (char *str,
                                                 size_t len,
                                                 const uint8_t *buf);
    void        volume_id_set_usage             (struct volume_id *id);
    void        volume_id_set_usage_part        (struct volume_id_partition *part);
    void        volume_id_set_label_raw         (struct volume_id *id,
                                                 const uint8_t *buf,
                                                 size_t count);
    void        volume_id_set_label_string      (struct volume_id *id,
                                                 const uint8_t *buf,
                                                 size_t count);
    void        volume_id_set_label_unicode16   (struct volume_id *id,
                                                 const uint8_t *buf);
    void        volume_id_set_uuid              (struct volume_id *id,
                                                 const uint8_t *buf);
    uint8_t*    volume_id_get_buffer            (struct volume_id *id,
                                                 uint64_t off,
                                                 size_t len);
    void        volume_id_free_buffer           (struct volume_id *id);

## Description

## Details

### bswap_16

    #define bswap_16		bswap16

### bswap_32

    #define bswap_32		bswap32

### bswap_64

    #define bswap_64		bswap64

### SB_BUFFER_SIZE

    #define SB_BUFFER_SIZE				0x11000

### SEEK_BUFFER_SIZE

    #define SEEK_BUFFER_SIZE			0x10000

### le16_to_cpu()

    #define     le16_to_cpu(x)

`x` :

### le32_to_cpu()

    #define     le32_to_cpu(x)

`x` :

### le64_to_cpu()

    #define     le64_to_cpu(x)

`x` :

### be16_to_cpu()

    #define     be16_to_cpu(x)

`x` :

### be32_to_cpu()

    #define     be32_to_cpu(x)

`x` :

### cpu_to_le16()

    #define     cpu_to_le16(x)

`x` :

### cpu_to_le32()

    #define     cpu_to_le32(x)

`x` :

### cpu_to_be32()

    #define     cpu_to_be32(x)

`x` :

### volume_id_set_unicode16 ()

    void        volume_id_set_unicode16         (char *str,
                                                 size_t len,
                                                 const uint8_t *buf);

`str` :

`len` :

`buf` :

`endianess` :

`count` :

### volume_id_set_usage ()

    void        volume_id_set_usage             (struct volume_id *id);

`id` :

`usage_id` :

### volume_id_set_usage_part ()

    void        volume_id_set_usage_part        (struct volume_id_partition *part);

`part` :

`usage_id` :

### volume_id_set_label_raw ()

    void        volume_id_set_label_raw         (struct volume_id *id,
                                                 const uint8_t *buf,
                                                 size_t count);

`id` :

`buf` :

`count` :

### volume_id_set_label_string ()

    void        volume_id_set_label_string      (struct volume_id *id,
                                                 const uint8_t *buf,
                                                 size_t count);

`id` :

`buf` :

`count` :

### volume_id_set_label_unicode16 ()

    void        volume_id_set_label_unicode16   (struct volume_id *id,
                                                 const uint8_t *buf);

`id` :

`buf` :

`endianess` :

`count` :

### volume_id_set_uuid ()

    void        volume_id_set_uuid              (struct volume_id *id,
                                                 const uint8_t *buf);

`id` :

`buf` :

`format` :

### volume_id_get_buffer ()

    uint8_t*    volume_id_get_buffer            (struct volume_id *id,
                                                 uint64_t off,
                                                 size_t len);

`id` :

`off` :

`len` :

Returns :

### volume_id_free_buffer ()

    void        volume_id_free_buffer           (struct volume_id *id);

`id` :