代码拉取完成,页面将自动刷新
From 57e9ee0f19098d56995955f6692437affdf94041 Mon Sep 17 00:00:00 2001
From: Alexey Bogdanenko <alexey@bogdanenko.com>
Date: Tue, 11 Dec 2018 16:55:34 +0300
Subject: [PATCH] udev-test: check if permitted to create block device nodes
(cherry picked from commit dbfbc6c4e34366033cb340e8b0c3cbca683ff6f5)
Related: #1642728
---
test/udev-test.pl | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/test/udev-test.pl b/test/udev-test.pl
index eb76ebd72e..957cda541c 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -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");
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。