git: 71d26d149f05 - stable/13 - linux(4): Use Linux dev_t type for mknod syscalls dev argument
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 29 Jun 2023 08:20:23 UTC
The branch stable/13 has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=71d26d149f055305e89e8ee35501e5bd0447ce6a
commit 71d26d149f055305e89e8ee35501e5bd0447ce6a
Author: Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-04-28 08:55:02 +0000
Commit: Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-06-29 08:15:37 +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.
(cherry picked from commit ca3333dd4a3bef7b615d5df104c525f8cac51b26)
---
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 90476b15433f..d4e7212c5ba6 100644
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -872,7 +872,7 @@
int linux_mknod(
char *path,
l_mode_t mode,
- l_uint dev
+ l_dev_t dev
);
}
134 AUE_USELIB UNIMPL uselib
@@ -1501,7 +1501,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 497e0e42da92..097c1ca4a86c 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -1614,7 +1614,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 647fd0262e8c..19ec0ee6c590 100644
--- a/sys/arm64/linux/syscalls.master
+++ b/sys/arm64/linux/syscalls.master
@@ -200,7 +200,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 4827e1eca2df..655c44da2fb8 100644
--- a/sys/i386/linux/syscalls.master
+++ b/sys/i386/linux/syscalls.master
@@ -1631,7 +1631,7 @@
l_int dfd,
const char *filename,
l_int mode,
- l_uint dev
+ l_dev_t dev
);
}
298 AUE_FCHOWNAT STD {