aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/old-tools/src/pfiflash_error.h
blob: 0f27f4ad5ff64d8812e8351b7ff4f52189122e53 (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef __PFIFLASH_ERROR_H__
#define __PFIFLASH_ERROR_H__
/*
 * Copyright (c) International Business Machines Corp., 2006
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
 * the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*
 * Author: Drake Dowsett <dowsett@de.ibm.com>
 * Contact: Andreas Arnez <arnez@de.ibm.com>
 */

enum pfiflash_err {
	PFIFLASH_ERR_EOF = 1,
	PFIFLASH_ERR_FIO,
	PFIFLASH_ERR_UBI_OPEN,
	PFIFLASH_ERR_UBI_CLOSE,
	PFIFLASH_ERR_UBI_MKVOL,
	PFIFLASH_ERR_UBI_RMVOL,
	PFIFLASH_ERR_UBI_VOL_UPDATE,
	PFIFLASH_ERR_UBI_VOL_FOPEN,
	PFIFLASH_ERR_UBI_UNKNOWN,
	PFIFLASH_ERR_UBI_VID_OOB,
	PFIFLASH_ERR_BOOTENV_CREATE,
	PFIFLASH_ERR_BOOTENV_READ,
	PFIFLASH_ERR_BOOTENV_SIZE,
	PFIFLASH_ERR_BOOTENV_WRITE,
	PFIFLASH_ERR_PDD_UNKNOWN,
	PFIFLASH_ERR_MTD_OPEN,
	PFIFLASH_ERR_MTD_CLOSE,
	PFIFLASH_ERR_CRC_CHECK,
	PFIFLASH_ERR_MTD_ERASE,
	PFIFLASH_ERR_COMPARE,
	PFIFLASH_CMP_DIFF
};

const char *const PFIFLASH_ERRSTR[] = {
	"",
	"unexpected EOF",
	"file I/O error",
	"couldn't open UBI",
	"couldn't close UBI",
	"couldn't make UBI volume %d",
	"couldn't remove UBI volume %d",
	"couldn't update UBI volume %d",
	"couldn't open UBI volume %d",
	"unknown UBI operation",
	"PFI data contains out of bounds UBI id %d",
	"couldn't create bootenv%s",
	"couldn't read bootenv",
	"couldn't resize bootenv",
	"couldn't write bootenv on ubi%d_%d",
	"unknown PDD handling algorithm",
	"couldn't open MTD device %s",
	"couldn't close MTD device %s",
	"CRC check failed: given=0x%08x, calculated=0x%08x",
	"couldn't erase raw mtd region",
	"couldn't compare volumes",
	"on-flash data differ from pfi data, update is neccessary"
};

#endif /* __PFIFLASH_ERROR_H__ */