diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-16 09:32:45 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-16 09:32:45 +0200 |
commit | 87b8bd5aed0d2a71cf77c7178d67a370a0f68612 (patch) | |
tree | e978edbddfee197210d25c78973a12e56896057f /common/cmd_jffs2.c | |
parent | 3d078ce6d786df932a0c00b8a95c0179c616ebc1 (diff) | |
download | u-boot-imx-87b8bd5aed0d2a71cf77c7178d67a370a0f68612.zip u-boot-imx-87b8bd5aed0d2a71cf77c7178d67a370a0f68612.tar.gz u-boot-imx-87b8bd5aed0d2a71cf77c7178d67a370a0f68612.tar.bz2 |
Fix return values of the jffs2 commands ls/fsload/fsinfo,
so we can use them to, e.g., check the existence of a file with
"if ls foo; then this; else that; fi" in the hush shell
Patch by Andreas Engel, 16 August 2005
Diffstat (limited to 'common/cmd_jffs2.c')
-rw-r--r-- | common/cmd_jffs2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index 16f5b7a..7ab6e9c 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -1810,7 +1810,7 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return !(size > 0); } - return 0; + return 1; } /** @@ -1846,9 +1846,9 @@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ret = jffs2_1pass_ls(part, filename); } - return (ret == 1); + return ret ? 0 : 1; } - return 0; + return 1; } /** @@ -1884,9 +1884,9 @@ int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ret = jffs2_1pass_info(part); } - return (ret == 1); + return ret ? 0 : 1; } - return 0; + return 1; } /* command line only */ |