File: fu-uswid.rs

package info (click to toggle)
fwupd 2.0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,340 kB
  • sloc: ansic: 274,440; python: 11,468; xml: 9,432; sh: 1,625; makefile: 167; cpp: 19; asm: 11; javascript: 9
file content (25 lines) | stat: -rw-r--r-- 551 bytes parent folder | download
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
// Copyright 2023 Richard Hughes <richard@hughsie.com>
// SPDX-License-Identifier: LGPL-2.1-or-later

enum FuUswidHeaderFlags {
    None = 0b0,
    Compressed = 0b1,
}

#[derive(ToString, FromString)]
enum FuUswidPayloadCompression {
    None = 0x00,
    Zlib = 0x01,
    Lzma = 0x02,
}

#[derive(New, ValidateStream, ParseStream, Default)]
#[repr(C, packed)]
struct FuStructUswid {
    magic: Guid == "4d4f4253-bad6-ac2e-a3e6-7a52aaee3baf",
    hdrver: u8,
    hdrsz: u16le = $struct_size,
    payloadsz: u32le,
    flags: u8,
    compression: u8,
}