mirror of
https://github.com/systemd/systemd.git
synced 2025-03-01 08:58:29 +03:00
udev-test: check if permitted to create block device nodes
This commit is contained in:
parent
a680beb2fe
commit
dbfbc6c4e3
@ -1554,6 +1554,14 @@ sub udev_setup {
|
||||
return 0;
|
||||
}
|
||||
|
||||
# check if we are permitted to create block device nodes
|
||||
my $block_device_filename = $udev_dev . "/sda";
|
||||
if (system("mknod", $block_device_filename, "b", "8", "0")) {
|
||||
warn "unable to create $block_device_filename";
|
||||
return 0;
|
||||
}
|
||||
unlink $block_device_filename;
|
||||
|
||||
system("cp", "-r", "test/sys/", $udev_sys) && die "unable to copy test/sys";
|
||||
|
||||
system("rm", "-rf", "$udev_run");
|
||||
|
Loading…
x
Reference in New Issue
Block a user