9
0
Fork 0

boot command: only create boot entries from scripts

When given a directory ignore all files that are not shell scripts.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2014-03-19 10:54:41 +01:00
parent 7c2dbf684b
commit 6357b7fdad
1 changed files with 5 additions and 0 deletions

View File

@ -106,6 +106,11 @@ static void bootsource_action(struct menu *m, struct menu_entry *me)
static int bootscript_create_entry(struct blspec *blspec, const char *name)
{
struct blspec_entry *be;
enum filetype type;
type = file_name_detect_type(name);
if (type != filetype_sh)
return -EINVAL;
be = blspec_entry_alloc(blspec);
be->me.type = MENU_ENTRY_NORMAL;