HomeFreeBSD

linux(4): Use Linux dev_t type for mknod syscalls dev argument

Description

linux(4): Use Linux dev_t type for mknod syscalls dev argument

As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit unsigned integer
on all platforms. Prior the 2.6 kernel dev_t type was an unsigned short.
However, since the firs commit of the Linuxulator, mknod syscall get int dev
argument.
Also, there is some confusion here, while the kernel declares a dev_t type
as a 32-bit sized, the user-space dev_t type can be size of 64 bits, e.g.,
in the Glibc library.
To avoid confusion and to help porting of the Linuxulator to other platforms
use explicit l_dev_t for dev argument of mknod syscalls.

Details

Provenance
dchaginAuthored on Apr 28 2023, 8:55 AM
Parents
rG19973638bee2: linux(4): Move dev_t type declaration under /compat/linux
Branches
Unknown
Tags
Unknown