Use CMD_RET_FAILURE and CMD_RET_SUCCESS defines instead
of 1 and 0.

Signed-off-by: Alexey Romanov <avroma...@salutedevices.com>
---
 cmd/jffs2.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/cmd/jffs2.c b/cmd/jffs2.c
index 15bf8c0edf..d5aa9bcc7e 100644
--- a/cmd/jffs2.c
+++ b/cmd/jffs2.c
@@ -485,7 +485,7 @@ int do_jffs2_fsload(struct cmd_tbl *cmdtp, int flag, int 
argc,
 
        /* make sure we are in sync with env variables */
        if (mtdparts_init() !=0)
-               return 1;
+               return CMD_RET_FAILURE;
 
        if ((part = jffs2_part_info(current_mtd_dev, current_mtd_partnum))){
 
@@ -502,16 +502,16 @@ int do_jffs2_fsload(struct cmd_tbl *cmdtp, int flag, int 
argc,
 
                if (size <= 0) {
                        printf("### %s LOAD ERROR<%x> for %s!\n", fsname, size, 
filename);
-                       return 1;
+                       return CMD_RET_FAILURE;
                }
 
                printf("### %s load complete: %d bytes loaded to 0x%lx\n",
                        fsname, size, offset);
                env_set_hex("filesize", size);
 
-               return 0;
+               return CMD_RET_SUCCESS;
        }
-       return 1;
+       return CMD_RET_FAILURE;
 }
 
 /**
@@ -535,7 +535,7 @@ int do_jffs2_ls(struct cmd_tbl *cmdtp, int flag, int argc, 
char *const argv[])
 
        /* make sure we are in sync with env variables */
        if (mtdparts_init() !=0)
-               return 1;
+               return CMD_RET_FAILURE;
 
        if ((part = jffs2_part_info(current_mtd_dev, current_mtd_partnum))){
 
@@ -547,9 +547,9 @@ int do_jffs2_ls(struct cmd_tbl *cmdtp, int flag, int argc, 
char *const argv[])
                        ret = jffs2_1pass_ls(part, filename);
                }
 
-               return ret ? 0 : 1;
+               return ret ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
        }
-       return 1;
+       return CMD_RET_FAILURE;
 }
 
 /**
@@ -571,7 +571,7 @@ int do_jffs2_fsinfo(struct cmd_tbl *cmdtp, int flag, int 
argc,
 
        /* make sure we are in sync with env variables */
        if (mtdparts_init() !=0)
-               return 1;
+               return CMD_RET_FAILURE;
 
        if ((part = jffs2_part_info(current_mtd_dev, current_mtd_partnum))){
 
@@ -586,9 +586,9 @@ int do_jffs2_fsinfo(struct cmd_tbl *cmdtp, int flag, int 
argc,
                        ret = jffs2_1pass_info(part);
                }
 
-               return ret ? 0 : 1;
+               return ret ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
        }
-       return 1;
+       return CMD_RET_FAILURE;
 }
 
 /***************************************************/
-- 
2.30.1

Reply via email to