On 2016-12-13 at 02:36:01 +0100, Vadim Kochan <vadi...@gmail.com> wrote:
> Add proc_find_by_inode(...) which finds pid by inode & gets processe's
> command line.
> 
> Actually this function was taken from flowtop.c walk_process(...)
> and refactored to look more generic.
> 
> Signed-off-by: Vadim Kochan <vadi...@gmail.com>
> ---
>  proc.c | 74 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  proc.h |  1 +
>  2 files changed, 75 insertions(+)
> 
> diff --git a/proc.c b/proc.c
> index 76e3c93..8119226 100644
> --- a/proc.c
> +++ b/proc.c
> @@ -3,11 +3,13 @@
>  #endif
>  #include <sched.h>
>  #include <sys/wait.h>
> +#include <sys/stat.h>
>  #include <sys/types.h>
>  #include <sys/resource.h>
>  #include <unistd.h>
>  #include <string.h>
>  #include <errno.h>
> +#include <dirent.h>
>  
>  #include "proc.h"
>  #include "die.h"
> @@ -83,6 +85,78 @@ ssize_t proc_get_cmdline(unsigned int pid, char *cmdline, 
> size_t len)
>       return ret;
>  }
>  
> +int __match_pid_by_inode(pid_t pid, ino_t ino)

Should be static as it is not used outside proc.c

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to