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
Changes for U-Boot 1.1.4:
======================================================================
+* 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
+
* Coding style cleanup
* Add support for Silicon Turnkey eXpress XTc (mpc87x/88x) board.
return !(size > 0);
}
- return 0;
+ return 1;
}
/**
ret = jffs2_1pass_ls(part, filename);
}
- return (ret == 1);
+ return ret ? 0 : 1;
}
- return 0;
+ return 1;
}
/**
ret = jffs2_1pass_info(part);
}
- return (ret == 1);
+ return ret ? 0 : 1;
}
- return 0;
+ return 1;
}
/* command line only */
jffs2_1pass_ls(struct part_info * part, const char *fname)
{
struct b_lists *pl;
- long ret = 0;
+ long ret = 1;
u32 inode;
if (! (pl = jffs2_get_list(part, "ls")))
{
struct b_lists *pl;
- long ret = 0;
+ long ret = 1;
u32 inode;
if (! (pl = jffs2_get_list(part, "load")))