Organize cmdline util.
This commit is contained in:
@@ -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 }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user