public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-common] syscall: use mknodat instead of mknod
@ 2025-08-11  7:56 Kamil Trzcinski
  0 siblings, 0 replies; only message in thread
From: Kamil Trzcinski @ 2025-08-11  7:56 UTC (permalink / raw)
  To: pve-devel

On arm64 the `SYS_mknod` is not available,
replace it with use of `SYS_mknodat`.

Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
---
 src/PVE/Syscall.pm | 2 +-
 src/PVE/Tools.pm   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Syscall.pm b/src/PVE/Syscall.pm
index 68e16fe..503d3fe 100644
--- a/src/PVE/Syscall.pm
+++ b/src/PVE/Syscall.pm
@@ -17,7 +17,7 @@ BEGIN {
         openat => &SYS_openat,
         close => &SYS_close,
         mkdirat => &SYS_mkdirat,
-        mknod => &SYS_mknod,
+        mknodat => &SYS_mknodat,
         faccessat => &SYS_faccessat,
         setresuid => &SYS_setresuid,
         fallocate => &SYS_fallocate,
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index fe9616e..f3c6e81 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -1817,7 +1817,7 @@ sub mkdirat($$$) {
 
 sub mknod($$$) {
     my ($filename, $mode, $dev) = @_;
-    return syscall(PVE::Syscall::mknod, $filename, int($mode), int($dev)) == 0;
+    return syscall(PVE::Syscall::mknodat, AT_FDCWD, $filename, int($mode), int($dev)) == 0;
 }
 
 sub fchownat($$$$$) {
-- 
2.47.2


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-11  7:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-11  7:56 [pve-devel] [PATCH pve-common] syscall: use mknodat instead of mknod Kamil Trzcinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal