git: ca3333dd4a3b - main - linux(4): Use Linux dev_t type for mknod syscalls dev argument
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Apr 2023 08:57:16 UTC
The branch main has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=ca3333dd4a3bef7b615d5df104c525f8cac51b26
commit ca3333dd4a3bef7b615d5df104c525f8cac51b26
Author: Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-04-28 08:55:02 +0000
Commit: Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-04-28 08:55:02 +0000
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.
---
sys/amd64/linux/syscalls.master | 4 ++--
sys/amd64/linux32/syscalls.master | 2 +-
sys/arm64/linux/syscalls.master | 2 +-
sys/i386/linux/syscalls.master | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master
index a2ac67c2d126..420c029fa892 100644
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -874,7 +874,7 @@
int linux_mknod(
char *path,
l_mode_t mode,
- l_uint dev
+ l_dev_t dev
);
}
134 AUE_USELIB UNIMPL uselib
@@ -1503,7 +1503,7 @@
l_int dfd,
const char *filename,
l_mode_t mode,
- l_uint dev
+ l_dev_t dev
);
}
260 AUE_FCHOWNAT STD {
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
index bd145c8ee7e1..777ffd865b8b 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -1616,7 +1616,7 @@
l_int dfd,
const char *filename,
l_int mode,
- l_uint dev
+ l_dev_t dev
);
}
298 AUE_FCHOWNAT STD {
diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master
index f4c2acca435d..2a564f0e3c5d 100644
--- a/sys/arm64/linux/syscalls.master
+++ b/sys/arm64/linux/syscalls.master
@@ -204,7 +204,7 @@
l_int dfd,
const char *filename,
l_int mode,
- l_uint dev
+ l_dev_t dev
);
}
34 AUE_MKDIRAT STD {
diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master
index c889cc4affe4..9175bcd45dcf 100644
--- a/sys/i386/linux/syscalls.master
+++ b/sys/i386/linux/syscalls.master
@@ -1633,7 +1633,7 @@
l_int dfd,
const char *filename,
l_int mode,
- l_uint dev
+ l_dev_t dev
);
}
298 AUE_FCHOWNAT STD {