]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: fix return code of 'sf erase'
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 2 Jan 2023 17:21:16 +0000 (18:21 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 26 Jan 2023 15:35:13 +0000 (21:05 +0530)
commitbaa08519db677f7f97abdfa5a4ffa89db522d130
treef9552d4a956fa3dfa7e1c2602afcfc822ef69d23
parentc99c7725564fdee8459d91c4273f56f267abf827
cmd: fix return code of 'sf erase'

If the offset or the size passed to the 'sf erase' command exceeds
the size of the SPI flash displaying the command usage is not
helpful. Return CMD_RET_FAILURE instead of CMD_RET_USAGE.

Use the CMD_RET_* constants instead of 0, 1, -1.

Simplify a logical expression in the final return statement.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
cmd/sf.c