Android-cuttlefish cvd tool
ext4_sb.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _EXT4_UTILS_EXT4_SB_H_
18#define _EXT4_UTILS_EXT4_SB_H_
19
21
22#define EXT4_SUPER_MAGIC 0xEF53
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include <stdbool.h>
29
30struct fs_info {
31 int64_t len; /* If set to 0, ask the block device for the size,
32 * if less than 0, reserve that much space at the
33 * end of the partition, else use the size given. */
34 uint32_t block_size;
39 uint32_t inode_size;
40 uint32_t inodes;
43 uint32_t feat_compat;
44 uint32_t feat_incompat;
46 uint16_t bg_desc_size;
47 const char* label;
48 uint8_t no_journal;
49 bool block_device; /* target fd is a block device? */
50};
51
52int ext4_parse_sb(struct ext4_super_block* sb, struct fs_info* info);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif
int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info)
Definition: ext4_sb.cpp:21
struct fs_info info
Definition: ext4_utils.cpp:42
Definition: ext4.h:415
Definition: ext4_sb.h:30
uint32_t feat_ro_compat
Definition: ext4_sb.h:42
uint32_t journal_blocks
Definition: ext4_sb.h:41
uint32_t block_size
Definition: ext4_sb.h:34
uint16_t bg_desc_size
Definition: ext4_sb.h:46
const char * label
Definition: ext4_sb.h:47
uint32_t bg_desc_reserve_blocks
Definition: ext4_sb.h:45
bool block_device
Definition: ext4_sb.h:49
uint8_t no_journal
Definition: ext4_sb.h:48
uint32_t inode_size
Definition: ext4_sb.h:39
uint32_t inodes_per_group
Definition: ext4_sb.h:38
uint32_t blocks_per_group
Definition: ext4_sb.h:35
uint32_t feat_incompat
Definition: ext4_sb.h:44
uint32_t flash_erase_block_size
Definition: ext4_sb.h:36
uint32_t feat_compat
Definition: ext4_sb.h:43
uint32_t flash_logical_block_size
Definition: ext4_sb.h:37
int64_t len
Definition: ext4_sb.h:31
uint32_t inodes
Definition: ext4_sb.h:40