Rename FilenameTooLong to FilenameInvalid

This commit is contained in:
Yuki Okushi 2022-01-31 17:24:10 +09:00
parent 1115f15e1c
commit 755e475c8b
No known key found for this signature in database
GPG Key ID: DABA5B072961C18A
3 changed files with 4 additions and 4 deletions

View File

@ -301,7 +301,7 @@ pub enum ErrorKind {
/// The limit might be from the underlying filesystem or API, or an administratively imposed
/// resource limit.
#[unstable(feature = "io_error_more", issue = "86442")]
FilenameTooLong,
FilenameInvalid,
/// Program argument list too long.
///
/// When trying to run an external program, a system or process limit on the size of the
@ -382,7 +382,7 @@ impl ErrorKind {
DirectoryNotEmpty => "directory not empty",
ExecutableFileBusy => "executable file busy",
FileTooLarge => "file too large",
FilenameTooLong => "filename too long",
FilenameInvalid => "filename too long",
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
FilesystemQuotaExceeded => "filesystem quota exceeded",
HostUnreachable => "host unreachable",

View File

@ -159,7 +159,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
libc::ENOSPC => StorageFull,
libc::ENOSYS => Unsupported,
libc::EMLINK => TooManyLinks,
libc::ENAMETOOLONG => FilenameTooLong,
libc::ENAMETOOLONG => FilenameInvalid,
libc::ENETDOWN => NetworkDown,
libc::ENETUNREACH => NetworkUnreachable,
libc::ENOTCONN => NotConnected,

View File

@ -104,7 +104,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
c::ERROR_POSSIBLE_DEADLOCK => return Deadlock,
c::ERROR_NOT_SAME_DEVICE => return CrossesDevices,
c::ERROR_TOO_MANY_LINKS => return TooManyLinks,
c::ERROR_FILENAME_EXCED_RANGE => return FilenameTooLong,
c::ERROR_FILENAME_EXCED_RANGE => return FilenameInvalid,
_ => {}
}