rearrange wrong error log and delete redundant log regarding deviced library 33/14933/2
authorjy910.yun <jy910.yun@samsung.com>
Fri, 10 May 2013 07:40:36 +0000 (16:40 +0900)
committerKrzysztof Sasiak <k.sasiak@samsung.com>
Thu, 16 Jan 2014 10:38:46 +0000 (11:38 +0100)
Change-Id: I8deabb118e03cd3058920619c3054d62562c5a91
Signed-off-by: jy910.yun <jy910.yun@samsung.com>
src/shared/deviced-conf.c
src/shared/deviced-noti.c
src/shared/deviced-util.c
src/shared/display.c

index 97ed181..dafc978 100644 (file)
@@ -63,8 +63,7 @@ int util_process_group_set(const char* name, int pid)
        }
 
        snprintf(buf, sizeof(buf), "%d", pid);
-       _E("pid(%d) is inserted at vip", pid);
-
+       _D("pid(%d) is inserted at vip", pid);
        return deviced_call_predef_action(PROCESS_GROUP_SET, 2, buf, name);
 }
 
@@ -128,7 +127,7 @@ static int copy_cmdline(int pid)
 
        fd = open(filepath, O_RDONLY);
        if (fd == -1) {
-               _D("Failed to open");
+               _E("Failed to open");
                return -1;
        }
 
@@ -137,7 +136,7 @@ static int copy_cmdline(int pid)
 
        if (cnt <= 0) {
                /* Read /proc/<pid>/cmdline error */
-               _D("Failed to read");
+               _E("Failed to read");
                return -1;
        }
 
@@ -145,17 +144,17 @@ static int copy_cmdline(int pid)
 
        fd = open(filepath, O_CREAT | O_WRONLY, 0644);
        if (fd == -1) {
-               _D("Failed to open");
+               _E("Failed to open");
                return -1;
        }
 
        if (write(fd, buf, cnt) == -1) {
-               _D("Failed to write");
+               _E("Failed to write");
                close(fd);
                return -1;
        }
-       close(fd);
 
+       close(fd);
        return 0;
 }
 
index 41d0702..20d6841 100644 (file)
@@ -92,7 +92,7 @@ static int deviced_noti_send(struct sysnoti *msg)
 
        client_sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
        if (client_sockfd == -1) {
-               _E("%s: socket create failed\n", __FUNCTION__);
+               _E("socket create failed");
                return -1;
        }
        bzero(&clientaddr, sizeof(clientaddr));
@@ -102,7 +102,7 @@ static int deviced_noti_send(struct sysnoti *msg)
 
        if (connect(client_sockfd, (struct sockaddr *)&clientaddr, client_len) <
            0) {
-               _E("%s: connect failed\n", __FUNCTION__);
+               _E("connect failed");
                close(client_sockfd);
                return -1;
        }
index ddc8d87..7fb3a2b 100644 (file)
@@ -129,4 +129,3 @@ API int deviced_get_apppath(pid_t pid, char *app_path, size_t app_path_size)
        app_path[ret] = '\0';
        return 0;
 }
-
index 7723432..db1e915 100644 (file)
@@ -97,7 +97,7 @@ API int display_set_brightness_with_setting(int val)
        }
 
        if (val == DISPLAY_DIM_BRIGHTNESS) {
-               _D("application can not set this value(DIM VALUE:%d)", val);
+               _E("application can not set this value(DIM VALUE:%d)", val);
                errno = EPERM;
                return -errno;
        }
@@ -134,7 +134,7 @@ API int display_set_brightness(int val)
        }
 
        if (val == DISPLAY_DIM_BRIGHTNESS) {
-               _D("application can not set this value(DIM VALUE:%d)", val);
+               _E("application can not set this value(DIM VALUE:%d)", val);
                errno = EPERM;
                return -errno;
        }