diff options
author | 2018-04-26 14:24:12 -0700 | |
---|---|---|
committer | 2018-04-26 14:24:12 -0700 | |
commit | 848ec0fae090dbc1657d02b436b8b887df519e90 (patch) | |
tree | 9d289473fde6fe1b45a376d10a16944b33ad7de9 /src/bits64/segmentation.rs | |
parent | 19843c0bcfb7a5d80720ba82524d40b3d69ace4e (diff) | |
download | rust-x86-848ec0fae090dbc1657d02b436b8b887df519e90.tar.gz rust-x86-848ec0fae090dbc1657d02b436b8b887df519e90.tar.zst rust-x86-848ec0fae090dbc1657d02b436b8b887df519e90.zip |
Rename types Descriptor{arch} to Descriptor.
Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
Diffstat (limited to 'src/bits64/segmentation.rs')
-rw-r--r-- | src/bits64/segmentation.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/bits64/segmentation.rs b/src/bits64/segmentation.rs index 8bcd8cf..058bead 100644 --- a/src/bits64/segmentation.rs +++ b/src/bits64/segmentation.rs @@ -1,7 +1,7 @@ #[allow(unused_imports)] use segmentation::{SegmentSelector}; use segmentation::{DescriptorBuilder, BuildDescriptor, DescriptorType, GateDescriptorBuilder, SegmentDescriptorBuilder, LdtDescriptorBuilder, CodeSegmentType, DataSegmentType, SystemDescriptorTypes64}; -use bits32::segmentation::{Descriptor32}; +use bits32::segmentation::Descriptor as Descriptor32; /// Entry for IDT, GDT or LDT. /// @@ -9,13 +9,13 @@ use bits32::segmentation::{Descriptor32}; /// "Segment Descriptor Tables in IA-32e Mode", especially Figure 3-8. #[derive(Copy, Clone, Debug, Default)] #[repr(C, packed)] -pub struct Descriptor64 { +pub struct Descriptor { desc32: Descriptor32, lower: u32, upper: u32 } -impl Descriptor64 { +impl Descriptor { pub(crate) fn apply_builder_settings(&mut self, builder: &DescriptorBuilder) { self.desc32.apply_builder_settings(builder); @@ -87,9 +87,9 @@ impl LdtDescriptorBuilder<u64> for DescriptorBuilder { } } -impl BuildDescriptor<Descriptor64> for DescriptorBuilder { - fn finish(&self) -> Descriptor64 { - let mut desc: Descriptor64 = Default::default(); +impl BuildDescriptor<Descriptor> for DescriptorBuilder { + fn finish(&self) -> Descriptor { + let mut desc: Descriptor = Default::default(); desc.apply_builder_settings(self); desc.desc32.set_l(); // 64-bit descriptor @@ -97,7 +97,6 @@ impl BuildDescriptor<Descriptor64> for DescriptorBuilder { Some(DescriptorType::System64(typ)) => { if typ == SystemDescriptorTypes64::LDT || typ == SystemDescriptorTypes64::TssAvailable || typ == SystemDescriptorTypes64::TssBusy { assert!(!self.db); - assert!(!self.db); } typ as u8 }, |