Don't be pedantic about requiring things to be ordinary files. Handle
character special devices specially so that eg. nm /dev/ksyms works.
This commit is contained in:
parent
a790d15184
commit
25a293877a
7
gnu/dist/binutils/binutils/bucomm.c
vendored
7
gnu/dist/binutils/binutils/bucomm.c
vendored
@ -469,7 +469,14 @@ get_file_size (const char * file_name)
|
||||
file_name, strerror (errno));
|
||||
}
|
||||
else if (! S_ISREG (statbuf.st_mode))
|
||||
{
|
||||
if (!S_ISCHR(statbuf.st_mode))
|
||||
{
|
||||
non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
|
||||
return 0;
|
||||
}
|
||||
return statbuf.st_size ? statbuf.st_size : 1;
|
||||
}
|
||||
else
|
||||
return statbuf.st_size;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user