[Title] Ignore stat function error.
authorjinhyung.jo <jinhyung.jo@samsung.com>
Sat, 8 Sep 2012 07:34:50 +0000 (16:34 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Tue, 11 Sep 2012 11:42:53 +0000 (20:42 +0900)
[Type] Bugfix
[Module] emulator-qemu
[Priority] Critical
[CQ#] N_SE-9595
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/hw/maru_camera_linux_pci.c

index 786be9b..9afcfdc 100644 (file)
@@ -365,18 +365,16 @@ int marucam_device_check(void)
     struct v4l2_capability cap;\r
 \r
     if (stat(dev_name, &st) < 0) {\r
-        ERR("Cannot identify '%s': %s\n", dev_name, strerror(errno));\r
-        return 0;\r
-    }\r
-\r
-    if (!S_ISCHR(st.st_mode)) {\r
-        ERR("%s is no device.\n", dev_name);\r
-        return 0;\r
+        INFO("<WARNING>Cannot identify '%s': %s\n", dev_name, strerror(errno));\r
+    } else {\r
+        if (!S_ISCHR(st.st_mode)) {\r
+            INFO("<WARNING>%s is no character device.\n", dev_name);\r
+        }\r
     }\r
 \r
     tmp_fd = open(dev_name, O_RDWR | O_NONBLOCK, 0);\r
     if (tmp_fd < 0) {\r
-        ERR("camera device open failed.(%s)\n", dev_name);\r
+        ERR("Camera device open failed.(%s)\n", dev_name);\r
         return 0;\r
     }\r
     if (ioctl(tmp_fd, VIDIOC_QUERYCAP, &cap) < 0) {\r