1 /******************************************************************************
2 * errnum.h
3 * this file contains #defined ints for return codes (errors and warnings)
4 * */
5 
6 /* error codes in between these numbers */
7 #define BKERROR_MAX_ID                           -1001
8 #define BKERROR_MIN_ID                           -10000
9 
10 /* warning codes in between these numbers */
11 #define BKWARNING_MAX_ID                         -10001
12 #define BKWARNING_MIN_ID                         -20000
13 
14 /* #define IS_ERROR(number)   ( (((number) >= BKERROR_MIN_ID) && ((number) <= BKERROR_MAX_ID)) ? true : false )
15 * #define IS_WARNING(number) ( (((number) >= BKWARNING_MIN_ID) && ((number) <= BKWARNING_MAX_ID)) ? true : false )*/
16 
17 #define BKERROR_READ_GENERIC                     -1001
18 #define BKERROR_READ_GENERIC_TEXT                "Failed to read expected number of bytes"
19 #define BKERROR_DIR_NOT_FOUND_ON_IMAGE           -1002
20 #define BKERROR_DIR_NOT_FOUND_ON_IMAGE_TEXT      "Directory not found on image"
21 #define BKERROR_MAX_NAME_LENGTH_EXCEEDED         -1003
22 #define BKERROR_MAX_NAME_LENGTH_EXCEEDED_TEXT    "Maximum file/directory name length exceeded"
23 #define BKERROR_STAT_FAILED                      -1004
24 #define BKERROR_STAT_FAILED_TEXT                 "Failed to stat file/directory"
25 #define BKERROR_TARGET_NOT_A_DIR                 -1005
26 #define BKERROR_TARGET_NOT_A_DIR_TEXT            "Target not a directory (UI problem)"
27 #define BKERROR_OUT_OF_MEMORY                    -1006
28 #define BKERROR_OUT_OF_MEMORY_TEXT               "Out of memory"
29 #define BKERROR_OPENDIR_FAILED                   -1007
30 #define BKERROR_OPENDIR_FAILED_TEXT              "Failed to open directory for listing"
31 #define BKERROR_EXOTIC                           -1008
32 #define BKERROR_EXOTIC_TEXT                      "Some really exotic problem happened"
33 #define BKERROR_FIXME                            -1009
34 #define BKERROR_FIXME_TEXT                       "Incomplete/broken something that the author needs to fix, please report bug"
35 #define BKERROR_FILE_NOT_FOUND_ON_IMAGE          -1010
36 #define BKERROR_FILE_NOT_FOUND_ON_IMAGE_TEXT     "File not found on image"
37 #define BKERROR_MKDIR_FAILED                     -1011
38 #define BKERROR_MKDIR_FAILED_TEXT                "Failed to create directory on the filesystem"
39 #define BKERROR_OPEN_WRITE_FAILED                -1012
40 #define BKERROR_OPEN_WRITE_FAILED_TEXT           "Failed to open file on the filesystem for writing"
41 #define BKERROR_WRITE_GENERIC                    -1013
42 #define BKERROR_WRITE_GENERIC_TEXT               "Failed to write expected number of bytes (disk full?)"
43 #define BKERROR_MANGLE_TOO_MANY_COL              -1014
44 #define BKERROR_MANGLE_TOO_MANY_COL_TEXT         "Too many collisons while mangling filenames (too many files/directories with a similar name)"
45 #define BKERROR_MISFORMED_PATH                   -1015
46 #define BKERROR_MISFORMED_PATH_TEXT              "Misformed path"
47 #define BKERROR_INVALID_UCS2                     -1016
48 #define BKERROR_INVALID_UCS2_TEXT                "Invalid UCS-2 string"
49 #define BKERROR_UNKNOWN_FILENAME_TYPE            -1017
50 #define BKERROR_UNKNOWN_FILENAME_TYPE_TEXT       "Unknown filename type"
51 #define BKERROR_RR_FILENAME_MISSING              -1018
52 #define BKERROR_RR_FILENAME_MISSING_TEXT         "Rockridge filename missing when expected on image"
53 #define BKERROR_VD_NOT_PRIMARY                   -1019
54 #define BKERROR_VD_NOT_PRIMARY_TEXT              "First volume descriptor type not primary like ISO9660 requires"
55 #define BKERROR_SANITY                           -1020
56 #define BKERROR_SANITY_TEXT                      "Internal library failure (sanity check), please report bug"
57 #define BKERROR_OPEN_READ_FAILED                 -1021
58 #define BKERROR_OPEN_READ_FAILED_TEXT            "Failed to open file on the filesystem for reading"
59 #define BKERROR_DIRNAME_NEED_TRAILING_SLASH      -1022
60 #define BKERROR_DIRNAME_NEED_TRAILING_SLASH_TEXT "String specifying directory name must end with '/'"
61 #define BKERROR_EXTRACT_ROOT                     -1023
62 #define BKERROR_EXTRACT_ROOT_TEXT                "Extracting root of iso not allowed"
63 #define BKERROR_DELETE_ROOT                      -1024
64 #define BKERROR_DELETE_ROOT_TEXT                 "Deleting root of iso not allowed"
65 #define BKERROR_DUPLICATE_ADD                    -1025
66 #define BKERROR_DUPLICATE_ADD_TEXT               "Cannot add item because another item with the same name already exists in this directory"
67 #define BKERROR_DUPLICATE_EXTRACT                -1026
68 #define BKERROR_DUPLICATE_EXTRACT_TEXT           "Cannot extract item because another item with the same name already exists in this directory"
69 #define BKERROR_NO_SPECIAL_FILES                 -1027
70 #define BKERROR_NO_SPECIAL_FILES_TEXT            "Special files (device files and such) are not supported"
71 #define BKERROR_NO_POSIX_PRESENT                 -1028
72 #define BKERROR_NO_POSIX_PRESENT_TEXT            "No posix extentions found"
73 #define BKERROR_EXTRACT_ABSENT_BOOT_RECORD       -1029
74 #define BKERROR_EXTRACT_ABSENT_BOOT_RECORD_TEXT  "Cannot extract boot record because there isn't one one the image"
75 #define BKERROR_EXTRACT_UNKNOWN_BOOT_MEDIA       -1030
76 #define BKERROR_EXTRACT_UNKNOWN_BOOT_MEDIA_TEXT  "Unable to extract boot record of unknown media type"
77 #define BKERROR_ADD_UNKNOWN_BOOT_MEDIA           -1031
78 #define BKERROR_ADD_UNKNOWN_BOOT_MEDIA_TEXT      "Unable to add boot record with unknown media type"
79 #define BKERROR_ADD_BOOT_RECORD_WRONG_SIZE       -1032
80 #define BKERROR_ADD_BOOT_RECORD_WRONG_SIZE_TEXT  "Size of boot record on the filesystem does not match the size requested via the boot record type parameter"
81 #define BKERROR_WRITE_BOOT_FILE_4                -1033
82 #define BKERROR_WRITE_BOOT_FILE_4_TEXT           "Size of no emulation boot record visible on image must be divisible by 4 so i can do a checksum (invalid boot file?)"
83 #define BKERROR_DUPLICATE_CREATE_DIR             -1034
84 #define BKERROR_DUPLICATE_CREATE_DIR_TEXT        "Cannot create directory because another file or directory with the same name exists"
85 #define BKERROR_NAME_INVALID_CHAR                -1035
86 #define BKERROR_NAME_INVALID_CHAR_TEXT           "Name contains invalid character(s)"
87 #define BKERROR_BLANK_NAME                       -1036
88 #define BKERROR_BLANK_NAME_TEXT                  "Name cannot be blank"
89 #define BKERROR_ADD_FILE_TOO_BIG                 -1037
90 #define BKERROR_ADD_FILE_TOO_BIG_TEXT            "Cannot add file larger than 4294967295 bytes because the ISO filesystem does not support such large files"
91 #define BKERROR_SAVE_OVERWRITE                   -1038
92 #define BKERROR_SAVE_OVERWRITE_TEXT              "Cannot overwrite original image when saving"
93 #define BKERROR_OPER_CANCELED_BY_USER            -1039
94 #define BKERROR_OPER_CANCELED_BY_USER_TEXT       "You have canceled the operation"
95 #define BKERROR_NOT_DIR_IN_PATH                  -1040
96 #define BKERROR_NOT_DIR_IN_PATH_TEXT             "One of the names in the path is not a directory"
97 #define BKERROR_WRONG_EXTRACT_FILE               -1041
98 #define BKERROR_WRONG_EXTRACT_FILE_TEXT          "Tried to extract something that's not a file using the file extracting function"
99 #define BKERROR_NOT_REG_FILE_FOR_BR              -1042
100 #define BKERROR_NOT_REG_FILE_FOR_BR_TEXT         "Can only use a regular file as a boot record"
101 #define BKERROR_WRITE_CACHE_OVERFLOWED           -1043
102 #define BKERROR_WRITE_CACHE_OVERFLOWED_TEXT      "Write cache overflowed, please report bug"
103 #define BKERROR_CREATE_SYMLINK_FAILED            -1044
104 #define BKERROR_CREATE_SYMLINK_FAILED_TEXT       "Failed to create symbolic link"
105 #define BKERROR_SYMLINK_TARGET_TOO_LONG          -1045
106 #define BKERROR_SYMLINK_TARGET_TOO_LONG_TEXT     "Too many characters in target of a symbolic link"
107 #define BKERROR_HARD_LINK_CALL_PARAMS            -1046
108 #define BKERROR_HARD_LINK_CALL_PARAMS_TEXT       "Call to a hard link function with both a 0 offset and a NULL filename not allowed"
109 #define BKERROR_NAME_INVALID                     -1047
110 #define BKERROR_NAME_INVALID_TEXT                "Invalid file/directory name"
111 #define BKERROR_RENAME_ROOT                      -1048
112 #define BKERROR_RENAME_ROOT_TEXT                 "Cannot rename the root directory"
113 #define BKERROR_ITEM_NOT_FOUND_ON_IMAGE          -1049
114 #define BKERROR_ITEM_NOT_FOUND_ON_IMAGE_TEXT     "Item not found on image"
115 #define BKERROR_DUPLICATE_RENAME                 -1050
116 #define BKERROR_DUPLICATE_RENAME_TEXT            "Cannot rename item because another file or directory with the same name exists"
117 #define BKERROR_GET_PERM_BAD_PARAM               -1051
118 #define BKERROR_GET_PERM_BAD_PARAM_TEXT          "bk_get_permissions() called with NULL mode_t*"
119 #define BKERROR_EDITED_EXTRACT_TOO_BIG           -1052
120 #define BKERROR_EDITED_EXTRACT_TOO_BIG_TEXT      "You edited the file and it's now too big for the .iso format to handle, so can't extract it"
121 #define BKERROR_EDITED_WRITE_TOO_BIG             -1053
122 #define BKERROR_EDITED_WRITE_TOO_BIG_TEXT        "You edited the file and it's now too big for the .iso format to handle, so can't write it"
123 
124 #define BKWARNING_OPER_PARTLY_FAILED             -10001
125 #define BKWARNING_OPER_PARTLY_FAILED_TEXT        "Operation was only partially successful or perhaps completely unsuccessful"
126 
127 /* do not make up #defines with numbers lower then this */
128 #define BKERROR_END                              -1000000
129 #define BKERROR_END_TEXT                         "Double oops, unusable error number used"
130