]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(cpio): correct dev_t -> rmajor/rminor mapping
authorDavid Disseldorp <ddiss@suse.de>
Thu, 10 Feb 2022 19:08:11 +0000 (20:08 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 17 Feb 2022 19:28:33 +0000 (19:28 +0000)
commitacc629abb0d7a26f692f99e5a9cf8c8401bc6a86
tree503d409708c9416fde5d2cae52b2c2b603eae54d
parent8bd7ddf8197c14532cf05edac3203d08798af6f2
fix(cpio): correct dev_t -> rmajor/rminor mapping

dev_t -> major/minor number mapping is more complicated than the
incorrect major=(dev_t >> 8) minor=(dev_t & 0xff) mapping that we
currently perform. Fix mapping to match Linux / glibc behaviour.

Fixes: https://github.com/dracutdevs/dracut/issues/1695
Reported-by: Ethan Wu <ethanwu10@gmail.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
src/dracut-cpio/src/main.rs