summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/tools/imgtool/imgterrs.c
blob: 23f6af9a5e78e268d118ab8addc675b5da9443e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// license:???
// copyright-holders:???
/***************************************************************************

    imgterrs.c

    Imgtool errors

***************************************************************************/

#include "imgtool.h"
#include "imgterrs.h"
#include "osdcomm.h"

static const char *const msgs[] =
{
	"Out of memory",
	"Unexpected error",
	"Argument too long",
	"Read error",
	"Write error",
	"Image is read only",
	"Corrupt image",
	"Corrupt file",
	"Corrupt directory",
	"File not found",
	"Unrecognized format",
	"Not implemented",
	"Parameter too small",
	"Parameter too large",
	"Missing parameter not found",
	"Inappropriate parameter",
	"Invalid parameter",
	"Bad file name",
	"Out of space on image",
	"Input past end of file",
	"Cannot specify path",
	"Invalid path",
	"Path not found",
	"Directory not empty",
	"Seek error",
	"File system does not support forks",
	"Fork not found",
	"Invalid partition"
};



const char *imgtool_error(imgtoolerr_t err)
{
	err = (imgtoolerr_t)(ERRORCODE(err) - 1);
	assert(err >= 0);
	assert(err < ARRAY_LENGTH(msgs));
	return msgs[err];
}