udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Enumerations | Functions | Variables
utils.h File Reference
`#include "config.h"`
`#include <ecma_167.h>`
`#include <libudffs.h>`
`#include <sys/types.h>`
`#include <unistd.h>`
`#include <stdio.h>`
`#include <errno.h>`
`#include <stdlib.h>`
`#include "udffsck.h"`
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Enumerations
enum | verbosity_e { NONE =0, WARN, MSG, DBG }

## Functions
int | print_disc (struct udf_disc *disc)
| Support function printing VDS, AVDP and LVID. More...
int | prompt (const char *format,...)
| Simple prompt printing out message and accepting y/Y/n/N. Anything else restarts prompt. More...
void | dbg (const char *format,...)
| Debug output. More...
void | dwarn (const char *format,...)
| Debug warning output. More...
void | note (const char *format,...)
| Note output. More...
void | msg (const char *format,...)
| Message output. More...
void | imp (const char *format,...)
| Important message output. More...
void | warn (const char *format,...)
| Warning output. More...
void | err (const char *format,...)
| Error output. More...
void | fatal (const char *format,...)
| Fatal Error output. More...
char * | verbosity_level_str (verbosity_e lvl)
| Verbosity level to string. More...
void | print_metadata_sequence (vds_sequence_t *seq)
| Prints metadata error sequence. More...

## Variables
verbosity_e | verbosity

## Enumeration Type Documentation

enum verbosity_e

Enumerator
NONE |
WARN |
MSG |
DBG |

Definition at line 38 of file utils.h.

## Function Documentation

void dbg | ( | const char * | format,
|  |  | ...
| ) |  |

Debug output.

Prefix: **[DBG]**
Color: default
Output: stdout

Parameters

  [in] | *format | string to print

Definition at line 296 of file utils.c.

void dwarn | ( | const char * | format,
|  |  | ...
| ) |  |

Debug warning output.

Prefix: **[DBG]**
Color: yellow
Output: stdout

Parameters

  [in] | *format | string to print

Definition at line 312 of file utils.c.

void err | ( | const char * | format,
|  |  | ...
| ) |  |

Error output.

Prefix: **[ERR]**
Color: Red
Output: stderr

Parameters

  [in] | *format | string to print

Definition at line 392 of file utils.c.

void fatal | ( | const char * | format,
|  |  | ...
| ) |  |

Fatal Error output.

Prefix: **[FATAL]**
Color: Red Output: stderr

Parameters

  [in] | *format | string to print

Definition at line 408 of file utils.c.

void imp | ( | const char * | format,
|  |  | ...
| ) |  |

Important message output.

Prefix: —
Color: Green
Output: stdout

Parameters

  [in] | *format | string to print

Definition at line 360 of file utils.c.

void msg | ( | const char * | format,
|  |  | ...
| ) |  |

Message output.

Prefix: —
Color: default
Output: stdout

Parameters

  [in] | *format | string to print

Definition at line 344 of file utils.c.

void note | ( | const char * | format,
|  |  | ...
| ) |  |

Note output.

Prefix: —
Color: default
Output: stdout

Parameters

  [in] | *format | string to print

Definition at line 328 of file utils.c.

int print_disc | ( | struct udf_disc * | disc | ) |

Support function printing VDS, AVDP and LVID.

Parameters

  [in] | *disc | UDF disc

Definition at line 102 of file utils.c.

void print_metadata_sequence | ( | vds_sequence_t * | seq | ) |

Prints metadata error sequence.

Parameters

  [in] | *seq | VDS sequence

Definition at line 440 of file utils.c.

int prompt | ( | const char * | format,
|  |  | ...
| ) |  |

Simple prompt printing out message and accepting y/Y/n/N. Anything else restarts prompt.

Parameters

  [in] | *format | formatting string with params for vprintf()

Returns
  0 if n/N
  1 if y/Y
  -1 if CRLF
  -128 prompt failed

Definition at line 184 of file utils.c.

char* verbosity_level_str | ( | verbosity_e | lvl | ) |

Verbosity level to string.

Returns
  constant char array

Definition at line 420 of file utils.c.

void warn | ( | const char * | format,
|  |  | ...
| ) |  |

Warning output.

Prefix: **[WARN]**
Color: Yellow
Output: stdout

Parameters

  [in] | *format | string to print

Definition at line 376 of file utils.c.

## Variable Documentation

verbosity_e verbosity

Definition at line 49 of file utils.c.