uboot/include
Simon Glass 87b6398b46 cli: hush: Adjust 'run' command to run each line of the env var
The run command treats each argument an an environment variable. It gets the
value of each variable and executes it as a command. If an environment
variable contains a newline and the hush cli is used, it is supposed to
execute each line one after the other.

Normally a newline signals to hush to exit - this is used in normal command
line entry - after a command is entered we want to return to allow the user
to enter the next one. But environment variables obviously need to execute
to completion.

Add a special case for the execution of environment variables which
continues when a newline is seen, and add a few tests to check this
behaviour.

Note: it's not impossible that this may cause regressions in other areas.
I can't think of a case but with any change of behaviour with limited test
coverage there is always a risk. From what I can tell this behaviour has
been around since at least U-Boot 2011.03, although this pre-dates sandbox
and I have not tested it on real hardware.

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-27 11:03:33 -04:00
..
andestech
asm-generic ppc: Zap Hymod board 2014-10-27 14:35:55 +01:00
bedbug
configs Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx 2014-10-27 11:03:00 -04:00
cramfs
dm dm: serial: use Driver Model for UniPhier serial driver 2014-10-23 21:43:09 -06:00
dt-bindings dm: dts: Move omap device tree includes to correct place 2014-10-23 19:30:51 -06:00
faraday
galileo
jffs2
linux Merge branch 'master' of git://git.denx.de/u-boot-ti 2014-10-27 09:05:43 -04:00
lzma
mtd kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
pcmcia
power tps65218/am43xx_evm: Add power framework support to TPS65218 2014-07-25 15:21:06 -04:00
samsung samsung: board: enable support of multiple board types 2014-09-05 13:58:50 +09:00
synopsys
u-boot Implement generalised RSA public exponents for verified boot 2014-08-09 11:17:01 -04:00
usb mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
zfs
.gitignore kconfig: switch to Kconfig 2014-07-30 08:48:03 -04:00
74xx_7xx.h
ACEX1K.h
MCD_dma.h
MCD_progCheck.h
MCD_tasksInit.h
SA-1100.h
_exports.h
aboot.h implement the Android sparse image format 2014-09-16 12:23:57 -04:00
addr_map.h
aes.h
ahci.h ahci: provide sunxi SATA driver using AHCI platform framework 2014-07-31 15:37:22 +02:00
ali512x.h
altera.h arm: socfpga: fpga: Add SoCFPGA FPGA programming interface 2014-10-06 17:46:50 +02:00
ambapp.h
android_image.h
ansi.h
api_public.h
armcoremodule.h
asm-offsets.h
ata.h
atmel_hlcdc.h
atmel_lcdc.h
atmel_mci.h MMC: atmel_mci: add configuration register definition 2014-08-01 20:01:22 +03:00
autoboot.h
axp152.h sunxi: Add axp152 pmic support 2014-07-18 19:42:16 +01:00
axp209.h sunxi: Add axp209 pmic support 2014-07-18 19:42:10 +01:00
bcd.h
bitfield.h
bmp_layout.h
bootcount.h
bootm.h bootm: add prototype for arch_preboot_os 2014-10-25 15:27:36 -04:00
bootretry.h
bootstage.h x86: Support loading kernel setup from a FIT 2014-10-22 09:03:06 -06:00
bouncebuf.h
bus_vcxk.h
bzlib.h
cbfs.h
circbuf.h
cli.h cli: Export cli_simple_process_macros for use outside of cli_simple 2014-08-21 12:01:13 -04:00
cli_hush.h cli: hush: Adjust 'run' command to run each line of the env var 2014-10-27 11:03:33 -04:00
clk.h
cmd_spl.h
command.h cli: hush: Adjust 'run' command to run each line of the env var 2014-10-27 11:03:33 -04:00
common.h ppc: Zap Hymod board 2014-10-27 14:35:55 +01:00
common_timing_params.h
commproc.h ppc: Zap MHPC board 2014-10-27 14:35:55 +01:00
compiler.h tools: compiler.h: Fix build on FreeBSD 2014-10-10 16:00:01 -04:00
config_cmd_all.h
config_cmd_default.h
config_defaults.h
config_distro_bootcmd.h config_distro_bootcmd: Run 'scsi scan' before trying scsi disks 2014-09-24 18:30:28 -04:00
config_distro_defaults.h
config_fallbacks.h kconfig: move CONFIG_SYS_HZ to lib/Kconfig 2014-10-23 13:18:59 -04:00
config_phylib_all_drivers.h
config_uncmd_spl.h
cpsw.h drivers: net: cpsw: add support for using second port as ethernet 2014-07-25 15:21:05 -04:00
crc.h
cros_ec.h dm: cros_ec: Add support for driver model 2014-10-22 10:36:53 -06:00
cros_ec_message.h
dataflash.h
ddr_spd.h
dfu.h dfu: Provide means to find difference between dfu-util -e and -R 2014-09-02 14:29:28 +02:00
dialog_pmic.h
div64.h
dm-demo.h
dm.h include/dm.h: fix inclusion guard 2014-06-21 10:06:58 -06:00
dm9000.h
dp83848.h
ds1722.h
ds4510.h
dtt.h
dwmmc.h mmc: dw_mmc: Fix cache alignment issue 2014-10-06 17:34:40 +02:00
e500.h
ec_commands.h
edid.h
elf.h elf: add prototype for valid_elf_image 2014-10-25 15:27:36 -04:00
env_attr.h
env_callback.h env_callback.h: spl: mark callback as maybe_unused 2014-07-18 17:53:23 -04:00
env_default.h
env_flags.h
environment.h env_mmc: support env partition setup in runtime 2014-08-01 20:12:15 +03:00
errno.h
exports.h
ext4fs.h fs: implement size/fatsize/ext4size 2014-08-09 11:16:57 -04:00
ext_common.h
fat.h fs: implement size/fatsize/ext4size 2014-08-09 11:16:57 -04:00
fb_mmc.h usb/gadget: fastboot: add eMMC support for flash command 2014-09-24 18:30:27 -04:00
fdt.h
fdt_support.h fdt_support: add prototypes for __weak functions 2014-10-25 15:27:36 -04:00
fdtdec.h Merge git://git.denx.de/u-boot-x86 2014-10-23 06:54:03 -04:00
fis.h
flash.h
fm_eth.h net: Merge asm/fsl_enet.h into fsl_mdio.h 2014-09-08 10:30:33 -07:00
fpga.h
fs.h fs: implement size/fatsize/ext4size 2014-08-09 11:16:57 -04:00
fsl_dcu_fb.h video: dcu: Add DCU driver support 2014-09-08 10:30:35 -07:00
fsl_ddr.h driver/ddr: Restruct driver to allow standalone memory space 2014-09-25 08:36:18 -07:00
fsl_ddr_dimm_params.h
fsl_ddr_sdram.h driver/ddr/fsl: Fix tXP and tCKE 2014-09-25 08:36:18 -07:00
fsl_ddrc_version.h
fsl_diu_fb.h
fsl_esdhc.h esdhc: Add CONFIG_SYS_FSL_ESDHC_LE and CONFIG_SYS_FSL_ESDHC_BE macros 2014-09-08 10:30:33 -07:00
fsl_ifc.h driver/nand: Add support of 16K SRAM for IFC 2.0 2014-07-22 16:25:54 -07:00
fsl_immap.h
fsl_mc.h armv8/fsl-lsch3: Add support to load and start MC Firmware 2014-07-03 08:40:58 +02:00
fsl_mdio.h net: Merge asm/fsl_enet.h into fsl_mdio.h 2014-09-08 10:30:33 -07:00
fsl_pmic.h
fsl_sec.h crypto/fsl: Add command for encapsulating/decapsulating blobs 2014-10-16 14:20:40 -07:00
fsl_usb.h
fuse.h
g_dnl.h
gdsys_fpga.h i2c: IHS I2C master driver 2014-07-07 19:47:18 -04:00
gt64120.h
hash.h hash: Use uint8_t in preference to u8 2014-06-19 11:18:55 -04:00
hw_sha.h
hwconfig.h
i2c.h
i2s.h
i8042.h stdio: Pass device pointer to stdio methods 2014-07-23 14:07:23 +01:00
ide.h ide: add missing prototype 2014-10-25 15:27:37 -04:00
image.h x86: Support loading kernel setup from a FIT 2014-10-22 09:03:06 -06:00
initcall.h
input.h
iomux.h
ioports.h
iotrace.h Add an I/O tracing feature 2014-06-20 11:54:29 -06:00
ipu_pixfmt.h
key_matrix.h
keyboard.h
kgdb.h
lattice.h
lcd.h lcd: cleanup unused functions 2014-08-10 15:25:19 +02:00
lcdvideo.h
ld9040.h
led-display.h
libata.h
libfdt.h fdt: Add a subnodes iterator macro 2014-10-22 16:56:41 -06:00
libfdt_env.h
libtizen.h
linker_lists.h dm: linker_lists: Add a way to declare multiple objects 2014-10-22 10:36:53 -06:00
linux_logo.h
lmb.h
logbuff.h
lxt971a.h
lynxkdi.h
malloc.h
mb862xx.h
mc9sdz60.h
mc13783.h
mc13892.h
mc34704.h
menu.h
micrel.h
mii_phy.h
miiphy.h
mk48t59.h
mmc.h mmc: add prototype for mmc_get_env_addr 2014-10-25 15:27:37 -04:00
mpc5xx.h
mpc5xxx.h
mpc5xxx_sdma.h
mpc8xx.h
mpc8xx_irq.h
mpc83xx.h
mpc85xx.h
mpc86xx.h
mpc106.h
mpc824x.h
mpc8260.h
mpc8260_irq.h
msc01.h
mtd_node.h
mv88e6352.h
mvebu_mmc.h ARM: kirkwood: add mvsdio driver 2014-08-01 18:44:56 +03:00
mvmfp.h
nand.h
net.h SPDX License cleanup for LiMon imported files 2014-10-10 09:44:43 -04:00
netdev.h net: mvneta.c: Add support for the ethernet controller of the Marvell Armada XP SoC 2014-10-23 09:59:21 -04:00
nomadik.h
ns16550.h dm: ns16550: Use an address instead of a pointer for the uart base 2014-10-23 19:29:07 -06:00
ns87308.h
onenand_uboot.h
os.h
palmas.h
part.h
part_efi.h
pc_keyb.h
pca953x.h
pca9564.h
pca9698.h
pci.h pci: add support for board_pci_fixup_dev function 2014-09-09 16:15:02 +02:00
pci_gt64120.h
pci_ids.h e1000: add i210 support 2014-08-21 12:01:28 -04:00
pci_msc01.h
pcmcia.h ppc: Zap ICU862 board 2014-10-27 14:35:55 +01:00
phy.h net: phy.h: Make PHY autonegotiation timeout configurable 2014-10-23 09:59:21 -04:00
physmem.h
post.h qe: move immap_qe.h from arch directory into common directory 2014-07-22 16:25:54 -07:00
ppc_asm.tmpl
ppc_defs.h
ps2mult.h
pwm.h
radeon.h
reiserfs.h
rtc.h
s6e63d6.h
s_record.h
sandboxblockdev.h
sandboxfs.h fs: implement size/fatsize/ext4size 2014-08-09 11:16:57 -04:00
sata.h sata: dwc_ahsata: implement sata_port_status 2014-09-09 15:32:32 +02:00
scf0403_lcd.h
scsi.h
sdhci.h
search.h Add option -r to env import to allow import of text files with CRLF as line endings 2014-07-22 07:44:26 -04:00
sed156x.h
sed13806.h
serial.h dm: Add a uclass for serial devices 2014-09-10 13:00:00 -06:00
sh_pfc.h
sh_tmu.h
sja1000.h
slre.h
sm501.h
sound.h
sparse_defs.h implement the Android sparse image format 2014-09-16 12:23:57 -04:00
sparse_format.h add header for Android sparse image format 2014-08-21 12:01:29 -04:00
spartan2.h
spartan3.h
spd.h
spd_sdram.h
spi.h dm: sandbox: Add a SPI emulation uclass 2014-10-22 10:36:46 -06:00
spi_flash.h dm: sf: Add a uclass for SPI flash 2014-10-22 10:36:50 -06:00
spl.h spl: add prototype for jump_to_image_no_args 2014-10-25 15:27:37 -04:00
splash.h
status_led.h ppc: Zap ICU862 board 2014-10-27 14:35:55 +01:00
stdio_dev.h stdio: Add force parameter to stdio_deregister 2014-10-06 14:50:43 +02:00
stratixII.h
sx151x.h
sym53c8xx.h
systemace.h microblaze: remove #ident directive to fix build error 2014-09-10 10:26:58 +02:00
tca642x.h
tegra-kbc.h
thor.h
timestamp.h
tis.h
tmu.h
tpm.h
tps6586x.h tps6586x.h: fix inclusion guard 2014-06-11 16:27:06 -04:00
trace.h
tsec.h net: tsec: Remove tx snooping support from LS1 2014-09-08 10:30:35 -07:00
tsi108.h
tsi148.h
twl4030.h
twl6030.h
tws.h
ubi_uboot.h lib, linux: move linux specific defines to linux/compat.h 2014-08-25 19:25:03 -04:00
universe.h
usb.h usb: dwc2: Add driver for Synopsis DWC2 USB IP block 2014-10-22 22:01:58 +02:00
usb_cdc_acm.h
usb_defs.h
usb_ether.h
usb_mass_storage.h
usbdescriptors.h
usbdevice.h
usbroothubdes.h
uuid.h
version.h
video.h stdio: Pass device pointer to stdio methods 2014-07-23 14:07:23 +01:00
video_ad7176.h
video_ad7177.h
video_ad7179.h
video_easylogo.h
video_fb.h
video_font.h
video_font_4x6.h
video_font_data.h
video_logo.h
virtex2.h
vsc7385.h
vsprintf.h
vxworks.h
w83c553f.h
watchdog.h support blackfin board initialization in generic board_f 2014-08-07 15:15:19 +08:00
xilinx.h
xyzModem.h
zfs_common.h
zynqpl.h