actually, we need the android lsmod to be a builtin not an alias…
This commit is contained in:
20
funcs.c
20
funcs.c
@ -38,7 +38,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.176 2011/03/13 01:20:19 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.177 2011/03/16 20:56:32 tg Exp $");
|
||||
|
||||
#if HAVE_KILLPG
|
||||
/*
|
||||
@ -60,6 +60,10 @@ __RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.176 2011/03/13 01:20:19 tg Exp $");
|
||||
#define c_ulimit c_label
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
static int c_android_lsmod(const char **);
|
||||
#endif
|
||||
|
||||
extern uint8_t set_refflag;
|
||||
|
||||
/*
|
||||
@ -130,6 +134,9 @@ const struct builtin mkshbuiltins[] = {
|
||||
#ifdef __MirBSD__
|
||||
/* alias to "true" for historical reasons */
|
||||
{"domainname", c_label},
|
||||
#endif
|
||||
#if defined(ANDROID)
|
||||
{"lsmod", c_android_lsmod},
|
||||
#endif
|
||||
{NULL, (int (*)(const char **))NULL}
|
||||
};
|
||||
@ -3717,3 +3724,14 @@ c_sleep(const char **wp)
|
||||
return (rv);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
static int
|
||||
c_android_lsmod(const char **wp MKSH_A_UNUSED)
|
||||
{
|
||||
const char *cwp[3] = { "cat", "/proc/modules", NULL };
|
||||
|
||||
builtin_argv0 = cwp[0];
|
||||
return (c_cat(cwp));
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user