Dont print error on IOCTL entry after success

This to reduce verbosity and avoid confusions when reading logs.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2021-12-31 01:38:08 +00:00
committed by Compute-Runtime-Automation
parent 24621e8d16
commit 38ad58bce3
2 changed files with 34 additions and 2 deletions

View File

@@ -240,7 +240,13 @@ int Drm::ioctl(unsigned long request, void *arg) {
}
if (printIoctl) {
printf("IOCTL %s returns %d, errno %d(%s)\n", IoctlToStringHelper::getIoctlString(request).c_str(), ret, returnedErrno, strerror(returnedErrno));
if (ret == 0) {
printf("IOCTL %s returns %d\n",
IoctlToStringHelper::getIoctlString(request).c_str(), ret);
} else {
printf("IOCTL %s returns %d, errno %d(%s)\n",
IoctlToStringHelper::getIoctlString(request).c_str(), ret, returnedErrno, strerror(returnedErrno));
}
}
} while (ret == -1 && (returnedErrno == EINTR || returnedErrno == EAGAIN || returnedErrno == EBUSY));