libs/foreignmemory: Avoid printing an error for ENOTSUPP
authorJulien Grall <julien.grall@arm.com>
Mon, 13 Aug 2018 17:33:25 +0000 (18:33 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 15 Aug 2018 09:26:21 +0000 (10:26 +0100)
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.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libs/foreignmemory/linux.c

index a6b41b0b7f6ef189fd2a12563b6c0992adb6c285..3686cf41e054399903bd2a09be620c60bc5e6a8f 100644 (file)
@@ -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;