aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorm00nbsd <42475391+m00nbsd@users.noreply.github.com>2020-06-27 17:24:37 +0200
committerGitHub <noreply@github.com>2020-06-27 17:24:37 +0200
commita2cdad9d42694059bd75f809d297ed9bf853da12 (patch)
tree28df8a6c4ba263e8e669dfec34d107f16de28970
parent2defc703fd6849944bde1737f38a46889fc095dc (diff)
executor/netbsd: base nth on 2 (#1874)
-rw-r--r--executor/common_bsd.h4
-rw-r--r--pkg/csource/generated.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h
index 070c512bf..a36979525 100644
--- a/executor/common_bsd.h
+++ b/executor/common_bsd.h
@@ -60,8 +60,8 @@ static int inject_fault(int nth)
fail("failed to open /dev/fault");
en.scope = FAULT_SCOPE_LWP;
- en.mode = FAULT_MODE_NTH;
- en.nth = nth;
+ en.mode = 0 /* FAULT_MODE_NTH_ONESHOT */;
+ en.nth = nth + 2 /* FAULT_NTH_MIN */;
if (ioctl(fd, FAULT_IOC_ENABLE, &en) != 0)
fail("FAULT_IOC_ENABLE failed with nth=%d", nth);
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 353bc60f9..2732eeb03 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -1599,8 +1599,8 @@ static int inject_fault(int nth)
fail("failed to open /dev/fault");
en.scope = FAULT_SCOPE_LWP;
- en.mode = FAULT_MODE_NTH;
- en.nth = nth;
+ en.mode = 0 /* FAULT_MODE_NTH_ONESHOT */;
+ en.nth = nth + 2 /* FAULT_NTH_MIN */;
if (ioctl(fd, FAULT_IOC_ENABLE, &en) != 0)
fail("FAULT_IOC_ENABLE failed with nth=%d", nth);