Skip to content

Commit

Permalink
binfmt/elf: both regular file and non-regular file (such as /dev/node…
Browse files Browse the repository at this point in the history
…) should be accessible

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
  • Loading branch information
wanggang26 authored and xiaoxiang781216 committed Jul 28, 2023
1 parent 7d281f4 commit 9d67c7b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions binfmt/libelf/libelf_init.c
Expand Up @@ -89,14 +89,6 @@ static inline int elf_filelen(FAR struct elf_loadinfo_s *loadinfo)
return ret;
}

/* Verify that it is a regular file */

if (!S_ISREG(buf.st_mode))
{
berr("Not a regular file. mode: %d\n", buf.st_mode);
return -ENOENT;
}

/* Return the size of the file in the loadinfo structure */

loadinfo->filelen = buf.st_size;
Expand Down

0 comments on commit 9d67c7b

Please sign in to comment.