diff options
author | Aaron Ball <nullspoon@oper.io> | 2023-06-09 17:49:04 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2023-06-09 17:49:04 -0600 |
commit | 102f10b0c2bb16cdbc654506cd2fa4000c66de78 (patch) | |
tree | 8910cd95061820dda6dd790fb090ef2fbcf479a5 /fdstats.h | |
parent | 2fcb8ea3ffa50b4866e1d97f3625129c8257605b (diff) | |
download | fd-enum-102f10b0c2bb16cdbc654506cd2fa4000c66de78.tar.gz fd-enum-102f10b0c2bb16cdbc654506cd2fa4000c66de78.tar.xz |
Reorganize code
This moves file descriptor stating code into the new fdstats files, and
the config code into the new config files. Relevant updates made to
reference structs by pointer.
Diffstat (limited to 'fdstats.h')
-rw-r--r-- | fdstats.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fdstats.h b/fdstats.h new file mode 100644 index 0000000..f01f2ca --- /dev/null +++ b/fdstats.h @@ -0,0 +1,22 @@ +#include <sys/stat.h> +#include <unistd.h> +#include <stdio.h> +#include "config.h" + +#ifndef _fdstats_h +#define _fdstats_h + +struct fdstats { + unsigned long livesize; + unsigned long deadsize; + unsigned long unknown; + unsigned long dead; + unsigned long live; + unsigned long sockets; + unsigned long inodes; + unsigned long pipes; +}; + +int fdstats_read(struct fdstats*, char*, struct config*); + +#endif |