From a0802f81fe5e80fc16086d3eb458690ab2205f1e Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Mon, 17 Jul 2023 11:43:43 +0900 Subject: [PATCH] Remove unused code and file Change-Id: I9c9c6e4652e9b97ad6e06efa8c0baebe0a2b4db4 Signed-off-by: Youngjae Cho --- src/libdeviced/deviced-noti.c | 2 +- src/libdeviced/deviced-util.c | 4 +++- src/shared/common.h | 4 ---- src/shared/deviced-internal.h | 38 -------------------------------------- src/shared/deviced-priv.h | 36 ------------------------------------ src/shared/score-defines.h | 31 ------------------------------- 6 files changed, 4 insertions(+), 111 deletions(-) delete mode 100644 src/shared/deviced-internal.h delete mode 100644 src/shared/deviced-priv.h delete mode 100644 src/shared/score-defines.h diff --git a/src/libdeviced/deviced-noti.c b/src/libdeviced/deviced-noti.c index 401a365..c148eeb 100644 --- a/src/libdeviced/deviced-noti.c +++ b/src/libdeviced/deviced-noti.c @@ -29,8 +29,8 @@ #include #include +#include "common.h" #include "dd-deviced.h" -#include "deviced-priv.h" #include "log.h" #define PREDEF_PWROFF_POPUP "pwroff-popup" diff --git a/src/libdeviced/deviced-util.c b/src/libdeviced/deviced-util.c index 6f73b5f..f38ad0d 100644 --- a/src/libdeviced/deviced-util.c +++ b/src/libdeviced/deviced-util.c @@ -32,7 +32,9 @@ #include "log.h" #include "dd-deviced.h" -#include "deviced-priv.h" +#include "common.h" + +#define BUFF_MAX 255 API int deviced_get_pid(const char *execpath) { diff --git a/src/shared/common.h b/src/shared/common.h index 1d9f1a0..08754f0 100644 --- a/src/shared/common.h +++ b/src/shared/common.h @@ -196,13 +196,10 @@ static inline void __cleanup_fclose_func(FILE **f) { #define _cleanup_fclose_ _cleanup_(__cleanup_fclose_func) #endif -int get_exec_pid(const char *execpath); -int get_cmdline_name(pid_t pid, char *cmdline, size_t cmdline_size); int is_app(pid_t pid); int run_child(int argc, const char *argv[]); int sys_check_node(char *path); int get_systemd_reboot_param(char *buf, unsigned bufsize); -int terminate_process(const char *partition, bool force); int mount_check(const char* path); void umount_partition_by_kill(const char *path, const int max_retry); int get_privilege(pid_t pid, char *name, size_t len); @@ -210,7 +207,6 @@ bool is_emulator(void); int do_mkdir(const char *path, mode_t mode); int do_copy_force(const char *src, const char *dst); void watchdog_notify(void); -int print_open_files(const char *mount_point); int get_command(pid_t pid, char *comm, size_t len); #ifdef __cplusplus diff --git a/src/shared/deviced-internal.h b/src/shared/deviced-internal.h deleted file mode 100644 index b26d67e..0000000 --- a/src/shared/deviced-internal.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * deviced - * - * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef ___DEVICED_INTERNAL___ -#define ___DEVICED_INTERNAL___ -#include -#include "dd-deviced.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* This file will be removed */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif -#endif /* ___DEVICED_INTERNAL___ */ diff --git a/src/shared/deviced-priv.h b/src/shared/deviced-priv.h deleted file mode 100644 index 8cb6cf9..0000000 --- a/src/shared/deviced-priv.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * deviced - * - * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __SYSTEM_PRIVATE__ -#define __SYSTEM_PRIVATE__ - -#include "common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define BUFF_MAX 255 - - int util_launch_app_cmd(const char *cmdline); - -#ifdef __cplusplus -} -#endif -#endif /* __SYSTEM_PRIVATE__ */ diff --git a/src/shared/score-defines.h b/src/shared/score-defines.h deleted file mode 100644 index 44638e7..0000000 --- a/src/shared/score-defines.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * deviced - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __OOM_H__ -#define __OOM_H__ - -#define OOMADJ_SU (0) -#define OOMADJ_INIT (100) -#define OOMADJ_FOREGRD_LOCKED (150) -#define OOMADJ_FOREGRD_UNLOCKED (200) -#define OOMADJ_BACKGRD_LOCKED (250) -#define OOMADJ_BACKGRD_UNLOCKED (300) -#define OOMADJ_APP_LIMIT OOMADJ_INIT - -#endif /* __OOM_H__ */ -- 2.7.4