Motr  M0
ugetopts.c File Reference
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lib/trace.h"
#include "lib/assert.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/getopts.h"
Include dependency graph for ugetopts.c:

Go to the source code of this file.

Macros

#define _POSIX_C_SOURCE   2 /* for getopt */
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB
 

Functions

static void usage (const char *progname, const struct m0_getopts_opt *opts, unsigned nr)
 
static int getnum (const char *arg, const char *desc, int64_t *out)
 
static int getscaled (const char *arg, const char *desc, m0_bcount_t *out)
 
int m0_getopts (const char *progname, int argc, char *const *argv, const struct m0_getopts_opt *opts, unsigned nr)
 

Variables

char * optarg
 
int optind
 
int optopt
 
int opterr
 
int optreset
 

Macro Definition Documentation

◆ _POSIX_C_SOURCE

#define _POSIX_C_SOURCE   2 /* for getopt */

Definition at line 24 of file ugetopts.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB

Definition at line 31 of file ugetopts.c.

Variable Documentation

◆ optarg

char* optarg

◆ opterr

int opterr

◆ optind

int optind

◆ optopt

int optopt

◆ optreset

int optreset