1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
From 13a29f3756bc4cab96c59f46c3875b483553fb8f Mon Sep 17 00:00:00 2001
From: Juergen Gross <jgross@suse.com>
Date: Tue, 7 Jun 2022 14:00:31 +0200
Subject: [PATCH 07/51] tools/libs/evtchn: don't set errno to negative values
Setting errno to a negative value makes no sense.
Fixes: 6b6500b3cbaa ("tools/libs/evtchn: Add support for restricting a handle")
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 60245b71c1cd001686fa7b7a26869cbcb80d074c
master date: 2022-04-22 20:39:34 +0100
---
tools/libs/evtchn/freebsd.c | 2 +-
tools/libs/evtchn/minios.c | 2 +-
tools/libs/evtchn/netbsd.c | 2 +-
tools/libs/evtchn/solaris.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/libs/evtchn/freebsd.c b/tools/libs/evtchn/freebsd.c
index 7427ab240860..fa17a0f8dbb5 100644
--- a/tools/libs/evtchn/freebsd.c
+++ b/tools/libs/evtchn/freebsd.c
@@ -58,7 +58,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce)
int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
{
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
diff --git a/tools/libs/evtchn/minios.c b/tools/libs/evtchn/minios.c
index e5dfdc5ef52e..c0bd5429eea2 100644
--- a/tools/libs/evtchn/minios.c
+++ b/tools/libs/evtchn/minios.c
@@ -97,7 +97,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce)
int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
{
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
diff --git a/tools/libs/evtchn/netbsd.c b/tools/libs/evtchn/netbsd.c
index 1cebc21ffce0..56409513bc23 100644
--- a/tools/libs/evtchn/netbsd.c
+++ b/tools/libs/evtchn/netbsd.c
@@ -53,7 +53,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce)
int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
{
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
diff --git a/tools/libs/evtchn/solaris.c b/tools/libs/evtchn/solaris.c
index df9579df1778..beaa7721425f 100644
--- a/tools/libs/evtchn/solaris.c
+++ b/tools/libs/evtchn/solaris.c
@@ -53,7 +53,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce)
int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
{
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
--
2.35.1
|