blob: 832fa3337f7269509f960b5199ce950fd8a1ee63 [file] [log] [blame]
Colin Cross9a2b60b2014-01-23 13:13:02 -08001/*
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
20#include "ext4_kernel_headers.h"
21
22#define EXT4_SUPER_MAGIC 0xEF53
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28struct fs_info {
29 int64_t len; /* If set to 0, ask the block device for the size,
30 * if less than 0, reserve that much space at the
31 * end of the partition, else use the size given. */
32 uint32_t block_size;
33 uint32_t blocks_per_group;
34 uint32_t inodes_per_group;
35 uint32_t inode_size;
36 uint32_t inodes;
37 uint32_t journal_blocks;
38 uint16_t feat_ro_compat;
39 uint16_t feat_compat;
40 uint16_t feat_incompat;
41 uint32_t bg_desc_reserve_blocks;
42 const char *label;
43 uint8_t no_journal;
44};
45
46int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info);
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif