Parse a `const FS_NAME = ` declaration out of fs.hll. Handles decimal and 0x-prefixed hex.
(src: &str, name: &str)
| 1749 | #[test] |
| 1750 | fn fs_layout_matches_fs_hll() { |
| 1751 | let path = concat!( |
| 1752 | env!("CARGO_MANIFEST_DIR"), |
| 1753 | "/crates/os-runtime/kernel/fs/fs.hll" |
| 1754 | ); |
| 1755 | let src = std::fs::read_to_string(path).expect("read fs.hll"); |
| 1756 | |
| 1757 | let pairs: &[(&str, i64)] = &[ |
| 1758 | ("FS_BLOCK_SIZE", fs_layout::BLOCK_SIZE as i64), |
| 1759 | ("FS_INODE_SIZE", fs_layout::INODE_SIZE as i64), |
| 1760 | ("FS_MAX_INODES", fs_layout::INODE_COUNT as i64), |
| 1761 | ("FS_BITMAP_BLOCK", fs_layout::BITMAP_BLOCK as i64), |
| 1762 | ("FS_DATA_BLOCK_START", fs_layout::DATA_BLOCK_START as i64), |
| 1763 | ("FS_DIRENT_SIZE", fs_layout::DIRENT_SIZE as i64), |
| 1764 | ("FS_DIRENTS_PER_BLOCK", fs_layout::DIRENTS_PER_BLOCK as i64), |
| 1765 | ("FS_INODE_BLOCKS", fs_layout::MAX_DIRECT_BLOCKS as i64), |
| 1766 | ("FS_IN_TYPE", fs_layout::IN_TYPE as i64), |
| 1767 | ("FS_IN_PARENT", fs_layout::IN_PARENT as i64), |
| 1768 | ("FS_IN_SIZE", fs_layout::IN_SIZE as i64), |
| 1769 | ("FS_IN_NAME", fs_layout::IN_NAME as i64), |
| 1770 | ("FS_IN_BLOCKS", fs_layout::IN_BLOCKS as i64), |
| 1771 | ("FS_DE_NAME", fs_layout::DE_NAME as i64), |
| 1772 | ("FS_DE_INODE", fs_layout::DE_INODE as i64), |
| 1773 | ("FS_SB_BLOCK_COUNT", fs_layout::SB_BLOCK_COUNT as i64), |
| 1774 | ("FS_SB_FREE_INODES", fs_layout::SB_FREE_INODES as i64), |
| 1775 | ("FS_SB_FREE_BLOCKS", fs_layout::SB_FREE_BLOCKS as i64), |
| 1776 | ("FS_SB_INODE_BITMAP", fs_layout::SB_INODE_BITMAP as i64), |