Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36d3f7d8 authored by Shuah Khan's avatar Shuah Khan
Browse files

selftests: media_dcevice_test fix to handle ioctl failure case



Fix to print information returned by ioctl only when
it returns success.

Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 3b48bfc0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ int main(int argc, char **argv)
		ret = ioctl(fd, MEDIA_IOC_DEVICE_INFO, &mdi);
		if (ret < 0)
			printf("Media Device Info errno %s\n", strerror(errno));
		else
			printf("Media device model %s driver %s\n",
				mdi.model, mdi.driver);
		sleep(10);