diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/nshlib/nsh.h | 28 | ||||
-rw-r--r-- | apps/nshlib/nsh_ddcmd.c | 2 |
2 files changed, 27 insertions, 3 deletions
diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index a17b0a901..dc13e3753 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -547,12 +547,36 @@ #endif /* Certain commands are not available in a kernel builds because they depend - * on interfaces that are not exported by the kernel. + * on interfaces that are not exported by the kernel. These are actually + * bugs that need to be fixed but for now the commands are simply disabled. + * There are three classes of fixes required: + * + * - Some of these interfaces are inherently internal to the OS (such as + * sched_foreach and foreach_mountpoint) and should never be made + * available to user applications as OS interfaces. For these, the long + * range solution to restoring the functionality will be to support procfs + * entries the provide the necessary interfaces. + * - Other interfaces are more standard and for these there probably should + * be new system calls to support the OS interface. Such interfaces + * include things like losetup, loteardown, and mkrd. + * - Other interfaces simply need to be moved out of the OS and into the C + * library where they will become accessible to application code. Such + * interfaces include mkfatfs. */ #if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL) -# undef CONFIG_NSH_DISABLE_DF +# undef CONFIG_NSH_DISABLE_PS /* 'ps' depends on sched_foreach */ +# define CONFIG_NSH_DISABLE_PS 1 +# undef CONFIG_NSH_DISABLE_DF /* 'df' depends on foreach_mountpoint */ # define CONFIG_NSH_DISABLE_DF 1 +# undef CONFIG_NSH_DISABLE_DD /* 'dd' depends on bchlib_* interfaces */ +# define CONFIG_NSH_DISABLE_DD 1 +# undef CONFIG_NSH_DISABLE_LOSETUP /* 'losetup' depends on losetup/loteardown */ +# define CONFIG_NSH_DISABLE_LOSETUP 1 +# undef CONFIG_NSH_DISABLE_MKFATFS /* 'mkfatfs' depends on mkfatfs interface */ +# define CONFIG_NSH_DISABLE_MKFATFS 1 +# undef CONFIG_NSH_DISABLE_MKRD /* 'mkrd' depends on ramdisk_register */ +# define CONFIG_NSH_DISABLE_MKRD 1 #endif /**************************************************************************** diff --git a/apps/nshlib/nsh_ddcmd.c b/apps/nshlib/nsh_ddcmd.c index 4ab80bef1..58298ea7a 100644 --- a/apps/nshlib/nsh_ddcmd.c +++ b/apps/nshlib/nsh_ddcmd.c @@ -59,7 +59,7 @@ #if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_NSH_DISABLE_DD) /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /* If no sector size is specified wity BS=, then the following default value |