- free(dname);
- fuser_scan_link(opts, "cwd", pid, ilist, plist);
- fuser_scan_link(opts, "exe", pid, ilist, plist);
- fuser_scan_link(opts, "root", pid, ilist, plist);
- fuser_scan_dir_links(opts, "fd", pid, ilist, plist);
- fuser_scan_dir_links(opts, "lib", pid, ilist, plist);
- fuser_scan_dir_links(opts, "mmap", pid, ilist, plist);
- fuser_scan_pid_maps(opts, "maps", pid, ilist, plist);
- chdir("..");
- }
- closedir(d);
- return 1;
-}
-
-static int fuser_print_pid_list(pid_list *plist) {
- pid_list *curr = plist;
-
- if(plist == NULL) return 0;
- while(curr != NULL) {
- if(curr->pid > 0) printf("%d ", curr->pid);
- curr = curr->next;