From 4f92d7aafd3fe47e164e7f65b4479f0a892e2789 Mon Sep 17 00:00:00 2001 From: anjiahao Date: Thu, 18 Jul 2024 17:04:53 +0800 Subject: [PATCH] modlib:Allow loading elf from block devices Signed-off-by: anjiahao --- libs/libc/modlib/modlib_init.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libs/libc/modlib/modlib_init.c b/libs/libc/modlib/modlib_init.c index 9b092fc583..d7162d38fb 100644 --- a/libs/libc/modlib/modlib_init.c +++ b/libs/libc/modlib/modlib_init.c @@ -70,14 +70,6 @@ static inline int modlib_fileinfo(FAR struct mod_loadinfo_s *loadinfo) return -errval; } - /* Verify that it is a regular file */ - - if (!S_ISREG(buf.st_mode)) - { - berr("ERROR: Not a regular file. mode: %d\n", buf.st_mode); - return -ENOENT; - } - /* Return some stats info of the file in the loadinfo structure */ loadinfo->filelen = buf.st_size;