udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
options.c File Reference
`#include "config.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <malloc.h>`
`#include "libudffs.h"`
`#include "options.h"`
`#include "utils.h"`
Include dependency graph for options.c:

Go to the source code of this file.

## Functions
void | usage (void)
| Prints out usage. More...
void | parse_args (int argc, char *argv[], char **path, int *blocksize)
| Input argument parsing function. More...

## Variables
verbosity_e | verbose = NONE
int | interactive = 0
int | autofix = 0
static struct option | long_options []
static char * | help []

## Function Documentation

void parse_args | ( | int | argc,
|  | char * | argv[],
|  | char ** | path,
|  | int * | blocksize
| ) |  |

Input argument parsing function.

This function parse thru inputs. It recognizes following: -vvvipch -B <BLOCKSIZE>. Without any argument is only path to medium.

Definition at line 99 of file options.c.

void usage | ( | void |  | ) |

Prints out usage.

Definition at line 67 of file options.c.

## Variable Documentation

int autofix = 0

Definition at line 34 of file options.c.

char* help[]
| static

Initial value:
= {
"Increase verbosity. Without it are printed only error messages, -v prints warnings, -vv is for humans, -vvv is for developers and curious people.",
"Medium block size. Mandatory parameter, can be 512, 1024, 2048 or 4096.",
"Medium is will be fixed interactivelly and all fixings must be authorized by user.",
"Medium is will be fixed automatically. All found errors will be fixed if possible.",
"Medium will be only checked. This is default behavior, but this flag override -p.",
"This help message.",
""
}

Help string for options

Definition at line 54 of file options.c.

int interactive = 0

Definition at line 33 of file options.c.

struct option long_options[]
| static

Initial value:
=
{
{"verbose", no_argument, 0, 'v'},
{"blocksize", required_argument, 0, 'B'},
{"interactive", no_argument, 0, 'i'},
{"autofix", no_argument, 0, 'p'},
{"check", no_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
}

Options for getopt_long() parser function.

Definition at line 39 of file options.c.

verbosity_e verbose = NONE

Definition at line 32 of file options.c.