Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Read files directly from ext4 filesystem images

License

NotificationsYou must be signed in to change notification settings

FauxFaux/ext4-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github CIcrates.io

ext4-rs can extract the basicstat information, directory listings, and file contentfrom real images generated by other tools, and by the Linux kernel.

This operates directly on partitions. To read actual disc images, probably need to handlepartition tables. This can be accomplished with thebootsector crate.

All basic file types are represented: files, directories, symlinks, char and block devices,fifos and sockets. Hard links are not a type of thing that makes sense: the item is just inmultiple directories.

Practical problems

  • No support for extended flags (e.g.immutable,append-only).
  • Probably contains overflows and fencepost errors, many of which Rust will translate topanics for you. At least, in debug mode.

Non-goals

This is not a filesystem driver. It does not support efficiently modifying real filesystems.Currently, it doesn't support modifying anything at all, but that may change.

I'm not especially interested in resource-constrained platforms: memory and IO are not usedefficiently.

Changelog

  • 0.10.0: move topositioned_io2 over weird seeking;rust 1.59
  • 0.7.0: userust 1.34 features to removecast dependency
  • 0.6.0: usefailure for error handling
  • 0.5.0: updatebitflags for associated constants, and rename some public constants.
  • 0.4.1: fix for an infinite loop parsing directory entries

MSRV

Rust 1.59 (Debian Bookworm /edition = "2021") is supported, and checked by CI.Updating this is a semver bump.

Development

Tests

Some of the tests read generated image files. These images are not directly checked into git,and will be unpacked bybuild.rs. These files are apparently very large, but should takevery little space. This requires a decenttar to be on the path.

These test assets can be rebuilt (on Linux, with root) by running./extract-test-data --refresh.

License note

The code is licensed under the super-permissive MIT license.

However, a number of struct and bitfield definitions, and some maths expressions,are lifted directly from the Linux, or e2fsprogs, source code. These code-bases areunder the GPLv2. I believe this to be fair use: these placesare the documentation,and only interface definitions have been extracted, no code. I leave the final decisionto you.

Thanks

This would have been practically impossible without the work aDjwong has done ontheext4 disk layout page onthe kernel wiki. I believe this person isDarrick Wong. Thanks, man.

About

Read files directly from ext4 filesystem images

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp