This repository has been archived by the owner on May 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
exit-codes.go
239 lines (163 loc) · 5.28 KB
/
exit-codes.go
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
/*
Copyright © 2022 - 2023 SUSE LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// provides a custom error interface and exit codes to use on the elemental-cli
package error
//
// Provided exit codes for elemental-cli
// To make it easy to generate them you have to respect the structure:
//
// comment that explains the error
// const NamedConstant = ERRORCODE
//
// This way you can later run `make build_docs` to generate the elemental_exit-codes.md in the docs dir automatically
// And they will be generated into a Markdown list of EXITCODE -> COMMENT
// Error closing a file
const CloseFile = 10
// Error running a command
const CommandRun = 11
// Error copying data
const CopyData = 12
// Error copying a file
const CopyFile = 13
// Wrong cosign flags used in cmd
const CosignWrongFlags = 14
// Error creating a dir
const CreateDir = 15
// Error creating a file
const CreateFile = 16
// Error creating a temporal dir
const CreateTempDir = 17
// Error dumping the source
const DumpSource = 18
// Error creating a gzip writer
const GzipWriter = 19
// Error trying to identify the source
const IdentifySource = 20
// Error calling mkfs
const MKFSCall = 21
// There is not packages for the given architecture
const NoPackagesForArch = 22
// No luet repositories configured
const NoReposConfigured = 23
// Error opening a file
const OpenFile = 24
// Output file already exists
const OutFileExists = 25
// Error reading the build config
const ReadingBuildConfig = 26
// Error reading the build-disk config
const ReadingBuildDiskConfig = 27
// Error running stat on a file
const StatFile = 28
// Error creating a tar archive
const TarHeader = 29
// Error truncating a file
const TruncateFile = 30
// Error reading the run config
const ReadingRunConfig = 31
// Error reading the install/upgrade flags
const ReadingInstallUpgradeFlags = 32
// Error reading the config for the command
const ReadingSpecConfig = 33
// Error mounting state partition
const MountStatePartition = 34
// Error mounting recovery partition
const MountRecoveryPartition = 35
// Error during before-upgrade hook
const HookBeforeUpgrade = 36
// Error during before-upgrade-chroot hook
const HookBeforeUpgradeChroot = 37
// Error during after-upgrade hook
const HookAfterUpgrade = 38
// Error during after-upgrade-chroot hook
const HookAfterUpgradeChroot = 39
// Error moving file
const MoveFile = 40
// Error occurred during cleanup
const Cleanup = 41
// Error occurred trying to reboot
const Reboot = 42
// Error occurred trying to shutdown
const PowerOff = 43
// Error occurred when labeling partition
const LabelImage = 44
// Error setting default grub entry
const SetDefaultGrubEntry = 45
// Error occurred during selinux relabeling
const SelinuxRelabel = 46
// Error invalid device specified
const InvalidTarget = 47
// Error deploying image to file
const DeployImage = 48
// Error installing GRUB
const InstallGrub = 49
// Error during before-install hook
const HookBeforeInstall = 50
// Error during after-install hook
const HookAfterInstall = 51
// Error during after-install-chroot hook
const HookAfterInstallChroot = 52
// Error during file download
const DownloadFile = 53
// Error mounting partitions
const MountPartitions = 54
// Error deactivating active devices
const DeactivatingDevices = 55
// Error during device partitioning
const PartitioningDevice = 56
// Device already contains an install
const AlreadyInstalled = 57
// Command requires root privileges
const RequiresRoot = 58
// Error occurred when unmounting partitions
const UnmountPartitions = 59
// Error occurred when formatting partitions
const FormatPartitions = 60
// Error during before-reset hook
const HookBeforeReset = 61
// Error during after-reset-chroot hook
const HookAfterResetChroot = 62
// Error during after-reset hook
const HookAfterReset = 63
// Unsupported flavor
const UnsupportedFlavor = 64
// Error encountered during cloud-init run-stage
const CloudInitRunStage = 65
// Error unpacking image
const UnpackImage = 66
// Error reading file
const ReadFile = 67
// No source was provided for the command
const NoSourceProvided = 68
// Error removing a file
const RemoveFile = 69
// Error calculating checksum
const CalculateChecksum = 70
// Error occurred when unmounting image
const UnmountImage = 71
// Error occurred during post-upgrade hook
const HookPostUpgrade = 72
// Error occurred during post-reset hook
const HookPostReset = 73
// Error occurred during post-install hook
const HookPostInstall = 74
// Error occurred while preparing the image root tree
const DeployImgTree = 75
// Error occurred while creating the OS filesystem image
const CreateImgFromTree = 76
// Error occurred while copying the filesystem image and setting new labels
const CopyFileImg = 77
// Error setting persistent GRUB variables
const SetGrubVariables = 78
// Unknown error
const Unknown int = 255