-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
mknodat
instead of mknod
for arm64
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
diff --git a/src/PVE/Syscall.pm b/src/PVE/Syscall.pm | ||
index 2a423e8..14c5466 100644 | ||
--- a/src/PVE/Syscall.pm | ||
+++ b/src/PVE/Syscall.pm | ||
@@ -16,7 +16,7 @@ BEGIN { | ||
openat => &SYS_openat, | ||
close => &SYS_close, | ||
mkdirat => &SYS_mkdirat, | ||
- mknod => &SYS_mknod, | ||
+ mknodat => &SYS_mknodat, | ||
faccessat => &SYS_faccessat, | ||
setresuid => &SYS_setresuid, | ||
fchownat => &SYS_fchownat, | ||
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm | ||
index 766c809..353503a 100644 | ||
--- a/src/PVE/Tools.pm | ||
+++ b/src/PVE/Tools.pm | ||
@@ -1753,7 +1753,8 @@ sub mkdirat($$$) { | ||
|
||
sub mknod($$$) { | ||
my ($filename, $mode, $dev) = @_; | ||
- return syscall(PVE::Syscall::SYS_mknod, $filename, int($mode), int($dev)) == 0; | ||
+ # AT_FDCWD = -100 | ||
+ return syscall(PVE::Syscall::SYS_mknodat, -100, $filename, int($mode), int($dev)) == 0; | ||
} | ||
|
||
sub fchownat($$$$$) { |