mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
Merge pull request #5477 from cakebaker/cat_eloop
cat: use error code 62 for ELOOP on FreeBSD
This commit is contained in:
commit
72193f8adc
1 changed files with 2 additions and 2 deletions
|
@ -409,9 +409,9 @@ fn get_input_type(path: &str) -> CatResult<InputType> {
|
|||
if let Some(raw_error) = e.raw_os_error() {
|
||||
// On Unix-like systems, the error code for "Too many levels of symbolic links" is 40 (ELOOP).
|
||||
// we want to provide a proper error message in this case.
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
#[cfg(not(any(target_os = "macos", target_os = "freebsd")))]
|
||||
let too_many_symlink_code = 40;
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
|
||||
let too_many_symlink_code = 62;
|
||||
if raw_error == too_many_symlink_code {
|
||||
return Err(CatError::TooManySymlinks);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue