···2021/// The command was used incorrectly (e.g. wrong number of arguments,
22/// bad flag, bad syntax in a parameter, etc).
23-pub const usage: u8 = metadata.base;
2425/// The input data was incorrect in some way. This should only be used
26/// for user's data and not system files (which should use `os_file`
27/// instead).
28-pub const data_err: u8 = metadata.base + 1;
2930/// An input file (not a system file, use `os_file` for that) did not
31/// exist or was not readable.
32-pub const no_input: u8 = metadata.base + 2;
3334/// The user specified did not exist.
35-pub const no_user: u8 = metadata.base + 3;
3637/// The host specified did not exist. This is used in network requests.
38-pub const no_host: u8 = metadata.base + 4;
3940/// A service is unavailable. This can occur if a support program or
41/// file does not exist. This can also be used as a catchall message
42/// when something you wanted to do doesn't work, but you don't know
43/// why.
44-pub const unavailable: u8 = metadata.base + 5;
4546/// An internal software error has been detected. This should be limited
47/// to non-operating system related errors if possible.
48-pub const software: u8 = metadata.base + 6;
4950/// An operating system error has been detected. This is intended to be
51/// used for such things as "cannot fork", "cannot create pipe", etc.
52-pub const os_err: u8 = metadata.base + 7;
5354/// Some system file (e.g. /etc/passwd, /var/run/utmp, etc.) does not
55/// exist, cannot be opened, or has some sort of error (e.g. syntax
56/// error).
57-pub const os_file: u8 = metadata.base + 8;
5859/// A user-specified output file cannot be created.
60-pub const cant_create: u8 = metadata.base + 9;
6162/// An error occurred while doing I/O on some file.
63-pub const io_err: u8 = metadata.base + 10;
6465/// Temporary failure, indicating something that is not really an error.
66/// For example, if a connection could not be created and should be
67/// reattempted later.
68-pub const temp_fail: u8 = metadata.base + 11;
6970/// The remote system returned something illegal during a protocol
71/// exchange.
72-pub const protocol: u8 = metadata.base + 12;
7374/// You did not have sufficient permission to perform the operation.
75/// This is not intended for filesystem problems, which should use
76/// `no_input` or `cant_create`. but rather for higher level
77/// permissions.
78-pub const no_permission: u8 = metadata.base + 13;
7980/// Something was found in an unconfigured or misconfigured state.
81-pub const config: u8 = metadata.base + 14;
8283test "metadata matches BSD sysexits" {
84 try testing.expectEqual(metadata.base, 64);
···2021/// The command was used incorrectly (e.g. wrong number of arguments,
22/// bad flag, bad syntax in a parameter, etc).
23+pub const usage: u8 = 64;
2425/// The input data was incorrect in some way. This should only be used
26/// for user's data and not system files (which should use `os_file`
27/// instead).
28+pub const data_err: u8 = 65;
2930/// An input file (not a system file, use `os_file` for that) did not
31/// exist or was not readable.
32+pub const no_input: u8 = 66;
3334/// The user specified did not exist.
35+pub const no_user: u8 = 67;
3637/// The host specified did not exist. This is used in network requests.
38+pub const no_host: u8 = 68;
3940/// A service is unavailable. This can occur if a support program or
41/// file does not exist. This can also be used as a catchall message
42/// when something you wanted to do doesn't work, but you don't know
43/// why.
44+pub const unavailable: u8 = 69;
4546/// An internal software error has been detected. This should be limited
47/// to non-operating system related errors if possible.
48+pub const software: u8 = 70;
4950/// An operating system error has been detected. This is intended to be
51/// used for such things as "cannot fork", "cannot create pipe", etc.
52+pub const os_err: u8 = 71;
5354/// Some system file (e.g. /etc/passwd, /var/run/utmp, etc.) does not
55/// exist, cannot be opened, or has some sort of error (e.g. syntax
56/// error).
57+pub const os_file: u8 = 72;
5859/// A user-specified output file cannot be created.
60+pub const cant_create: u8 = 73;
6162/// An error occurred while doing I/O on some file.
63+pub const io_err: u8 = 74;
6465/// Temporary failure, indicating something that is not really an error.
66/// For example, if a connection could not be created and should be
67/// reattempted later.
68+pub const temp_fail: u8 = 75;
6970/// The remote system returned something illegal during a protocol
71/// exchange.
72+pub const protocol: u8 = 76;
7374/// You did not have sufficient permission to perform the operation.
75/// This is not intended for filesystem problems, which should use
76/// `no_input` or `cant_create`. but rather for higher level
77/// permissions.
78+pub const no_permission: u8 = 77;
7980/// Something was found in an unconfigured or misconfigured state.
81+pub const config: u8 = 78;
8283test "metadata matches BSD sysexits" {
84 try testing.expectEqual(metadata.base, 64);