2 * Copyright (c) 2017 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __HELPER_PROCFS_H__
19 #define __HELPER_PROCFS_H__
23 #define PROC_BUF_MAX 64
26 * @desc get command line from /proc/{pid}/cmdline
27 * @return negative value if error
29 int proc_get_cmdline(pid_t pid, char *cmdline);
32 * @desc get smack subject label from /proc/{pid}/attr/current
33 * this label can indicate package name about child processes
34 * @return negative value if error or pid doesn't exist
36 int proc_get_label(pid_t pid, char *label);
39 * @desc get status from /proc/{pid}/status
40 * @return negative value if error
42 int proc_get_status(pid_t pid, char status[][PROC_BUF_MAX]);
44 #endif /*__HELPER_PROCFS_H__*/