Changeset 291af81 in mainline


Ignore:
Timestamp:
2012-04-25T19:35:55Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
296ef5d6
Parents:
bc03679
Message:

missing getters and setters in superblock, many function missing yet

Location:
uspace/lib/ext4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_superblock.c

    rbc03679 r291af81  
    354354}
    355355
     356const uint8_t * ext4_superblock_get_uuid(ext4_superblock_t *sb)
     357{
     358        return sb->uuid;
     359}
     360
     361void ext4_superblock_set_uuid(ext4_superblock_t *sb, const uint8_t *uuid)
     362{
     363        memcpy(sb->uuid, uuid, sizeof(sb->uuid));
     364}
     365
     366const char * ext4_superblock_get_volume_name(ext4_superblock_t *sb)
     367{
     368        return sb->volume_name;
     369}
     370
     371void ext4_superblock_set_volume_name(ext4_superblock_t *sb, const char *name)
     372{
     373        memcpy(sb->volume_name, name, sizeof(sb->volume_name));
     374}
     375
     376const char * ext4_superblock_get_last_mounted(ext4_superblock_t *sb)
     377{
     378        return sb->last_mounted;
     379}
     380
     381void ext4_superblock_set_last_mounted(ext4_superblock_t *sb, const char *last)
     382{
     383        memcpy(sb->last_mounted, last, sizeof(sb->last_mounted));
     384}
     385
     386
    356387uint32_t ext4_superblock_get_last_orphan(ext4_superblock_t *sb)
    357388{
  • uspace/lib/ext4/libext4_superblock.h

    rbc03679 r291af81  
    9999extern void     ext4_superblock_set_features_read_only(ext4_superblock_t *, uint32_t);
    100100
     101extern const uint8_t * ext4_superblock_get_uuid(ext4_superblock_t *);
     102extern void ext4_superblock_set_uuid(ext4_superblock_t *, const uint8_t *);
     103extern const char * ext4_superblock_get_volume_name(ext4_superblock_t *);
     104extern void ext4_superblock_set_volume_name(ext4_superblock_t *, const char *);
     105extern const char * ext4_superblock_get_last_mounted(ext4_superblock_t *);
     106extern void ext4_superblock_set_last_mounted(ext4_superblock_t *, const char *);
     107
    101108/*
    102 uint8_t s_uuid[16]; // 128-bit uuid for volume
    103 char volume_name[16]; // Volume name
    104 char last_mounted[64]; // Directory where last mounted
    105109uint32_t s_algorithm_usage_bitmap; // For compression
    106110uint8_t s_prealloc_blocks; // Number of blocks to try to preallocate
Note: See TracChangeset for help on using the changeset viewer.