udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
utils.h
Go to the documentation of this file.
1 /*
2 * utils.h
3 *
4 * Copyright (c) 2016 Vojtech Vladyka <vojtch.vladyka@gmail.com>
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 *
21 */
22 #ifndef __UTILS_H__
23 #define __UTILS_H__
24
25 #include "config.h"
26
27 #include <ecma_167.h>
28 #include <libudffs.h>
29
30 #include <sys/types.h>
31 #include <unistd.h>
32 #include <stdio.h>
33 #include <errno.h>
34 #include <stdlib.h>
35
36 #include "udffsck.h"
37
38 typedef enum {
39 NONE=0,
40 WARN,
41 MSG,
42 DBG
43 } verbosity_e;
44
45 extern verbosity_e verbosity;
46
47 int print_disc(struct udf_disc *disc);
48 int prompt(const char *format, ...);
49
50 void dbg(const char *format, ...);
51 void dwarn(const char *format, ...);
52 void note(const char *format, ...);
53 void msg(const char *format, ...);
54 void imp(const char *format, ...);
55 void warn(const char *format, ...);
56 void err(const char *format, ...);
57 void fatal(const char *format, ...);
58
59 char * verbosity_level_str(verbosity_e lvl);
60
61 void print_metadata_sequence(vds_sequence_t *seq);
62
63 #endif //__UTILS_H__
prompt
int prompt(const char *format,...)
Simple prompt printing out message and accepting y/Y/n/N. Anything else restarts prompt.
Definition: utils.c:184
verbosity_e
verbosity_e
Definition: utils.h:38
MSG
Definition: utils.h:41
note
void note(const char *format,...)
Note output.
Definition: utils.c:328
dwarn
void dwarn(const char *format,...)
Debug warning output.
Definition: utils.c:312
vds_sequence_t
Definition: udffsck.h:56
warn
void warn(const char *format,...)
Warning output.
Definition: utils.c:376
print_disc
int print_disc(struct udf_disc *disc)
Support function printing VDS, AVDP and LVID.
Definition: utils.c:102
NONE
Definition: utils.h:39
dbg
void dbg(const char *format,...)
Debug output.
Definition: utils.c:296
ecma_167.h
fatal
void fatal(const char *format,...)
Fatal Error output.
Definition: utils.c:408
msg
void msg(const char *format,...)
Message output.
Definition: utils.c:344
imp
void imp(const char *format,...)
Important message output.
Definition: utils.c:360
WARN
Definition: utils.h:40
err
void err(const char *format,...)
Error output.
Definition: utils.c:392
format
int format(int fd, int session_grow, int size)
Definition: ide-pc.c:102
DBG
Definition: utils.h:42
udffsck.h
udf_disc
Definition: libudffs.h:95
verbosity
verbosity_e verbosity
Definition: utils.c:49
libudffs.h
print_metadata_sequence
void print_metadata_sequence(vds_sequence_t *seq)
Prints metadata error sequence.
Definition: utils.c:440
verbosity_level_str
char * verbosity_level_str(verbosity_e lvl)
Verbosity level to string.
Definition: utils.c:420