Organize cmdline util.

This commit is contained in:
Christian Deacon
2025-02-22 11:41:48 -05:00
parent 060aafbaf5
commit e3b1f04c11
2 changed files with 12 additions and 12 deletions

View File

@@ -1,18 +1,14 @@
#include <stdio.h> #include <loader/utils/cmdline.h>
#include <stdlib.h>
#include <getopt.h>
#include "cmdline.h"
const struct option opts[] = const struct option opts[] =
{ {
{"config", required_argument, NULL, 'c'}, { "config", required_argument, NULL, 'c' },
{"offload", no_argument, NULL, 'o'}, { "offload", no_argument, NULL, 'o' },
{"skb", no_argument, NULL, 's'}, { "skb", no_argument, NULL, 's' },
{"time", required_argument, NULL, 't'}, { "time", required_argument, NULL, 't' },
{"list", no_argument, NULL, 'l'}, { "list", no_argument, NULL, 'l' },
{"help", no_argument, NULL, 'h'}, { "help", no_argument, NULL, 'h' },
{NULL, 0, NULL, 0} { NULL, 0, NULL, 0 }
}; };
/** /**

View File

@@ -1,5 +1,9 @@
#pragma once #pragma once
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
struct cmdline struct cmdline
{ {
char *cfgfile; char *cfgfile;