freebsd-dev/sys/compat
Dmitry Chagin 166e2e5a9e linux(4): Uniformly dev_t arguments translation
The two main uses of dev_t are in struct stat and as a parameter of the
mknod system calls.
As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit quantity
with 12 bits set asaid for the major number and 20 for the minor number.
The in-kernel dev_t encoded as MMMmmmmm, where M is a hex digit of the
major number and m is a hex digit of the minor number.
The user-space dev_t encoded as mmmM MMmm, where M and m is the major
and minor numbers accordingly. This is downward compatible with legacy
systems where dev_t is 16 bits wide, encoded as MMmm.
In glibc dev_t is a 64-bit quantity, with 32-bit major and minor numbers,
encoded as MMMM Mmmm mmmM MMmm. This is downward compatible with the Linux
kernel and with legacy systems where dev_t is 16 bits wide.
In the FreeBSD dev_t is a 64-bit quantity. The major and minor numbers
are encoded as MMMmmmMm, therefore conversion of the device numbers between
Linux user-space and FreeBSD kernel required.
2023-04-28 11:55:05 +03:00
..
freebsd32 linux(4): Add a dedicated statat() implementation 2023-04-28 11:55:04 +03:00
ia32 Retire sv_transtrap 2022-05-20 14:54:03 +03:00
lindebugfs lindebugfs: Add debugfs_create_file_size() 2023-01-25 23:23:16 +01:00
linprocfs linux(4): Migrate to IfAPI 2023-03-04 12:11:38 +03:00
linsysfs linsysfs(4): Reimplement listnics() using ifAPI 2023-04-03 11:22:16 +03:00
linux linux(4): Uniformly dev_t arguments translation 2023-04-28 11:55:05 +03:00
linuxkpi linuxkpi: Migrate to IfAPI 2023-04-24 09:54:22 -04:00
x86bios pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t. 2022-09-22 15:08:52 -07:00