Skip to content

Commit 9eb9f23

Browse files
committed
multiboot2: bitflags v1.0 -> v2.0
1 parent ce64782 commit 9eb9f23

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

multiboot2/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ builder = ["alloc"]
4040
unstable = []
4141

4242
[dependencies]
43-
bitflags = "1"
43+
bitflags = "2"
4444
derive_more = { version = "0.99", default-features = false, features = ["display"] }
4545
log = { version = "0.4", default-features = false }
4646
uefi-raw = { version = "0.2.0", default-features = false }

multiboot2/src/elf_sections.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ pub enum ElfSectionType {
409409

410410
bitflags! {
411411
/// ELF Section bitflags.
412+
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
413+
#[repr(transparent)]
412414
pub struct ElfSectionFlags: u64 {
413415
/// The section contains data that should be writable during program execution.
414416
const WRITABLE = 0x1;

multiboot2/src/vbe_info.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ pub struct VBEField {
247247

248248
bitflags! {
249249
/// The Capabilities field indicates the support of specific features in the graphics environment.
250+
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
251+
#[repr(transparent)]
250252
pub struct VBECapabilities: u32 {
251253
/// Can the DAC be switched between 6 and 8 bit modes.
252254
const SWITCHABLE_DAC = 0x1;
@@ -263,6 +265,8 @@ bitflags! {
263265

264266
bitflags! {
265267
/// A Mode attributes bitfield.
268+
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
269+
#[repr(transparent)]
266270
pub struct VBEModeAttributes: u16 {
267271
/// Mode supported by hardware configuration.
268272
const SUPPORTED = 0x1;
@@ -294,6 +298,8 @@ bitflags! {
294298
bitflags! {
295299
/// The WindowAttributes describe the characteristics of the CPU windowing
296300
/// scheme such as whether the windows exist and are read/writeable, as follows:
301+
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
302+
#[repr(transparent)]
297303
pub struct VBEWindowAttributes: u8 {
298304
/// Relocatable window(s) supported?
299305
const RELOCATABLE = 0x1;
@@ -317,6 +323,8 @@ bitflags! {
317323
/// (it is assumed all color ramp data is 8 bits per primary).
318324
/// Bit D1 specifies whether the bits in the Rsvd field of the direct color
319325
/// pixel can be used by the application or are reserved, and thus unusable.
326+
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
327+
#[repr(transparent)]
320328
pub struct VBEDirectColorAttributes: u8 {
321329
/// Color ramp is fixed when cleared and programmable when set.
322330
const PROGRAMMABLE = 0x1;

0 commit comments

Comments
 (0)