dp_child = opendir(buf);
if (!dp_child)
continue;
- while (1){
+ while (1) {
ret = readdir_r(dp_child, &entry_child, &dentry_child);
if (ret != 0 || dentry_child == NULL)
break;
- snprintf(check_path, PATH_MAX, "%s/%s",buf, dentry_child->d_name);
+ snprintf(check_path, PATH_MAX, "%s/%s", buf, dentry_child->d_name);
- if(readlink(check_path, buf2, PATH_MAX) < 0)
+ if (readlink(check_path, buf2, PATH_MAX) < 0)
continue;
- if(strncmp(buf2, mount_point, len) == 0)
+ if (strncmp(buf2, mount_point, len) == 0)
_D("Process %s : Opened files - %s", cmdline, buf2);
}
closedir(dp_child);
int get_privilege(pid_t pid, char *name, size_t len);
bool is_emulator(void);
void watchdog_notify(void);
+int print_open_files(const char *mount_point);
#endif /* __CORE_COMMON_H__ */