summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2023-06-09 17:49:04 -0600
committerAaron Ball <nullspoon@oper.io>2023-06-09 17:49:04 -0600
commit102f10b0c2bb16cdbc654506cd2fa4000c66de78 (patch)
tree8910cd95061820dda6dd790fb090ef2fbcf479a5 /config.h
parent2fcb8ea3ffa50b4866e1d97f3625129c8257605b (diff)
downloadfd-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 'config.h')
-rw-r--r--config.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..98d0d86
--- /dev/null
+++ b/config.h
@@ -0,0 +1,24 @@
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#ifndef _config_h
+#define _config_h
+
+struct config {
+ pid_t pid;
+ char dead;
+ char live;
+ char sockets;
+ char inodes;
+ char pipes;
+ char showstats;
+ char showsizefd;
+ char showsizelive;
+ char showsizedead;
+ char truncate_dead;
+};
+
+int config_from_argv(struct config*, int, char**);
+#endif

Generated by cgit