Changeset 6ba36a0 in mainline for uspace/lib/ext4/include


Ignore:
Timestamp:
2018-10-03T15:31:58Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b0ceb1
Parents:
b209135
Message:

Setting a custom ext4 volume label.

Location:
uspace/lib/ext4/include/ext4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/include/ext4/cfg.h

    rb209135 r6ba36a0  
    3434#define LIBEXT4_CFG_H_
    3535
     36#include "types.h"
     37
    3638/** Versions available to choose from when creating a new file system. */
    3739typedef enum {
     
    4547#define ext4_def_fs_version extver_ext2
    4648
     49/** Configuration of a new ext4 file system */
     50typedef struct {
     51        /** File system version */
     52        ext4_cfg_ver_t version;
     53        /** Volume name encoded as UTF-8 string */
     54        const char *volume_name;
     55} ext4_cfg_t;
     56
    4757#endif
    4858
  • uspace/lib/ext4/include/ext4/filesystem.h

    rb209135 r6ba36a0  
    4242
    4343extern errno_t ext4_filesystem_probe(service_id_t, ext4_fs_probe_info_t *);
    44 extern errno_t ext4_filesystem_create(ext4_cfg_ver_t, service_id_t);
     44extern errno_t ext4_filesystem_create(ext4_cfg_t *, service_id_t);
    4545extern errno_t ext4_filesystem_open(ext4_instance_t *, service_id_t,
    4646    enum cache_mode, aoff64_t *, ext4_filesystem_t **);
  • uspace/lib/ext4/include/ext4/superblock.h

    rb209135 r6ba36a0  
    120120extern errno_t ext4_superblock_get_volume_name(ext4_superblock_t *, char *,
    121121    size_t);
    122 extern void ext4_superblock_set_volume_name(ext4_superblock_t *, const char *);
     122extern errno_t ext4_superblock_set_volume_name(ext4_superblock_t *, const char *);
    123123extern const char *ext4_superblock_get_last_mounted(ext4_superblock_t *);
    124124extern void ext4_superblock_set_last_mounted(ext4_superblock_t *, const char *);
     
    166166extern uint32_t ext4_superblock_get_inodes_in_group(ext4_superblock_t *,
    167167    uint32_t);
    168 extern errno_t ext4_superblock_create(size_t, uint64_t, ext4_cfg_ver_t,
     168extern errno_t ext4_superblock_create(size_t, uint64_t, ext4_cfg_t *,
    169169    ext4_superblock_t **);
    170170extern uint32_t ext4_superblock_get_group_backup_blocks(ext4_superblock_t *,
  • uspace/lib/ext4/include/ext4/types.h

    rb209135 r6ba36a0  
    235235} ext4_filesystem_t;
    236236
     237/** Size of buffer for volume name. To hold 16 latin-1 chars encoded as UTF-8
     238 * and a null terminator we need 2 * 16 + 1 bytes
     239 */
     240#define EXT4_VOL_NAME_BYTES 33
     241
    237242typedef struct {
    238         /** Volume name, to hold 16 latin-1 chars in UTF-8 and null terminator
    239          * we need 2 * 16 + 1 bytes
    240          */
    241         char vol_name[33];
     243        char vol_name[EXT4_VOL_NAME_BYTES];
    242244} ext4_fs_probe_info_t;
    243245
Note: See TracChangeset for help on using the changeset viewer.