1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

pub const HEADER_SIZE: u32 = 4096;

// -- Magic numbers--
pub const MINFS_MAGIC: [u8; 16] = [
    0x21, 0x4d, 0x69, 0x6e, 0x46, 0x53, 0x21, 0x00, 0x04, 0xd3, 0xd3, 0xd3, 0xd3, 0x00, 0x50, 0x38,
];

pub const BLOBFS_MAGIC: [u8; 16] = [
    0x21, 0x4d, 0x69, 0x9e, 0x47, 0x53, 0x21, 0xac, 0x14, 0xd3, 0xd3, 0xd4, 0xd4, 0x00, 0x50, 0x98,
];

pub const GPT_MAGIC: [u8; 16] = [
    0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54, 0x00, 0x00, 0x01, 0x00, 0x5c, 0x00, 0x00, 0x00,
];

pub const FVM_MAGIC: [u8; 8] = [0x46, 0x56, 0x4d, 0x20, 0x50, 0x41, 0x52, 0x54];

pub const ZXCRYPT_MAGIC: [u8; 16] = [
    0x5f, 0xe8, 0xf8, 0x00, 0xb3, 0x6d, 0x11, 0xe7, 0x80, 0x7a, 0x78, 0x63, 0x72, 0x79, 0x70, 0x74,
];

pub const BLOCK_VERITY_MAGIC: [u8; 16] = [
    0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x76, 0x31, 0x00,
];

pub const VB_META_MAGIC: [u8; 4] = [b'A', b'V', b'B', b'0'];

pub const F2FS_MAGIC: [u8; 4] = [0x10, 0x20, 0xf5, 0xf2];

pub const FXFS_MAGIC: [u8; 8] = [b'F', b'x', b'f', b's', b'S', b'u', b'p', b'r'];

// -- Partition labels --
pub const BLOBFS_PARTITION_LABEL: &str = "blobfs";

pub const DATA_PARTITION_LABEL: &str = "data";

pub const LEGACY_DATA_PARTITION_LABEL: &str = "minfs";