This repository has been archived on 2022-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
ext2-rs/src/lib.rs

31 lines
584 B
Rust
Raw Normal View History

2018-03-18 18:02:31 -05:00
#![feature(alloc)]
#![feature(specialization)]
#![feature(swap_with_slice)]
2018-03-18 09:25:05 -05:00
#![cfg_attr(not(test), no_std)]
2018-03-18 18:02:31 -05:00
extern crate alloc;
2018-03-18 11:42:59 -05:00
#[macro_use]
extern crate bitflags;
2018-03-18 18:02:31 -05:00
#[cfg(test)]
extern crate core;
2018-03-18 11:42:59 -05:00
2018-03-18 12:12:10 -05:00
pub mod error;
2018-03-18 14:35:55 -05:00
pub mod sys;
2018-03-18 18:02:31 -05:00
pub mod buffer;
pub mod fs;
2018-03-18 11:42:59 -05:00
2018-03-18 09:25:05 -05:00
#[cfg(test)]
2018-03-18 11:42:59 -05:00
mod tests {
2018-03-18 14:35:55 -05:00
use sys::superblock::*;
use sys::block_group::*;
use sys::inode::*;
2018-03-18 11:42:59 -05:00
#[test]
fn sizes() {
use std::mem::size_of;
assert_eq!(size_of::<Superblock>(), 1024);
assert_eq!(size_of::<BlockGroupDescriptor>(), 32);
assert_eq!(size_of::<Inode>(), 128);
}
}