Browse Source

Add function to parse config

Serj Kalichev 3 years ago
parent
commit
15b7ffdbbc
2 changed files with 10 additions and 0 deletions
  1. 9 0
      birq.c
  2. 1 0
      birq.h

+ 9 - 0
birq.c

@@ -46,6 +46,7 @@ static void help(int status, const char *argv0);
 static struct options *opts_init(void);
 static void opts_free(struct options *opts);
 static int opts_parse(int argc, char *argv[], struct options *opts);
+static int parse_config(const char *fname, struct options *opts);
 
 /* Command line options */
 struct options {
@@ -457,3 +458,11 @@ static void help(int status, const char *argv0)
 		printf("\t-s <strategy>, --strategy=<strategy> Strategy to choose IRQ to move (min/max/rnd).\n");
 	}
 }
+
+/*--------------------------------------------------------- */
+/* Parse config file */
+static int parse_config(const char *fname, struct options *opts)
+{
+
+	return 0;
+}

+ 1 - 0
birq.h

@@ -2,6 +2,7 @@
 #define _birq_h
 
 #define BIRQ_PIDFILE "/var/run/birq.pid"
+#define BIRQ_CFGFILE "/etc/birq/birq.conf"
 
 /* Interval beetween balance iterations, in seconds.
    The long interval is used when there are no overloaded CPUs.