Skip to contentSkip to conversation

libs/foreignmemory: Avoid printing an error for ENOTSUPP

PATCH In review Julien Grall 3 participants 3 messages Aug 13, 2018 – Aug 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libs/foreignmemory: Avoid printing an error for ENOTSUPP

Resource mapping is not supported on Arm and results to an error message at every guest boot:

xenforeignmemory: error: ioctl failed: Operation not supported

Hide the error message when errnor is ENOTSUPP.

---
 tools/libs/foreignmemory/linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libs/foreignmemory/linux.c +1 -1
index a6b41b0b7f..3686cf41e0 100644
@@ -307,7 +307,7 @@ int osdep_xenforeignmemory_map_resource(
     {
         int saved_errno;
 
-        if ( errno != ENOTTY )
+        if ( errno != ENOTTY && errno != EOPNOTSUPP )
             PERROR("ioctl failed");
         else
             errno = EOPNOTSUPP;
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: Julien Grall [mailto:[email protected]]
Sent: 13 August 2018 18:33
To: [email protected]
Cc: Ian Jackson <[email protected]>; Wei Liu <[email protected]>; Paul Durrant <[email protected]>; Julien Grall <[email protected]>
Subject: [PATCH] libs/foreignmemory: Avoid printing an error for ENOTSUPP

Quoted 8 lines

Resource mapping is not supported on Arm and results to an error message at every guest boot:

xenforeignmemory: error: ioctl failed: Operation not supported

Hide the error message when errnor is ENOTSUPP.

Quoted 19 lines
---
 tools/libs/foreignmemory/linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libs/foreignmemory/linux.c +1 -2
index a6b41b0b7f..3686cf41e0 100644
@@ -307,7 +307,7 @@ int osdep_xenforeignmemory_map_resource(
     {
         int saved_errno;
 
-        if ( errno != ENOTTY )
+        if ( errno != ENOTTY && errno != EOPNOTSUPP )
             PERROR("ioctl failed");
         else
             errno = EOPNOTSUPP;
--
Quoted 1 line

2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Julien Grall
Quoted 8 lines · Julien Grall

Resource mapping is not supported on Arm and results to an error message at every guest boot:

xenforeignmemory: error: ioctl failed: Operation not supported

Hide the error message when errnor is ENOTSUPP.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel