Several commands must be disabled in the kernel build because they depend on interfaces that are not available outside of the kernel: dd, df, losetup, mkfatfs, mkdr, and ps.
This commit is contained in:
parent
1597617001
commit
4eadcabc1b
28
nshlib/nsh.h
28
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
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user