mirror of
https://git.proxmox.com/git/pve-common
synced 2025-05-29 15:12:13 +00:00
Tools: make unshare behave like other perl syscalls
Most syscall wrappers in perl return 1 on success and our current use of Tools::unshare isn't using the return value (yet), so let's fix this while we can. Also it seems to make sense to use prototyping on syscalls to add some compile-time argument checking.
This commit is contained in:
parent
9de823bdc3
commit
817c6be02c
@ -1169,9 +1169,9 @@ sub parse_host_and_port {
|
||||
return; # nothing
|
||||
}
|
||||
|
||||
sub unshare {
|
||||
sub unshare($) {
|
||||
my ($flags) = @_;
|
||||
syscall 272, $flags;
|
||||
return 0 == syscall(272, $flags);
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user