From: ito at mlb.co.jp Date: Tue, 04 Apr 2006 16:05:45 +0900 (JST) Subject: [U-Boot-Users] [PATCH] Fix return value of ext2load Message-ID: <20060404.160545.59656825.ito@mlb.co.jp> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello I like to do if ext2load ide 0 80400000 $bootfile; then bootm; fi but the return value of ext2load is always false. Please consider to merge. Patch is attched. -------- Hiroshi Ito Media Lab. Inc., URL http://www.mlb.co.jp ( Sorry, Japanese only. ) TEL +81-3-5294-7255 FAX +81-3-5294-7256 -------------- next part -------------- diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index 9cf2fb7..069f8ae 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -769,7 +769,7 @@ int ext2fs_open (char *filename) { int len; if (ext2fs_root == NULL) { - return (-1); + return (0); } ext2fs_file = NULL; status = ext2fs_find_file (filename, &ext2fs_root->diropen, &fdiro, @@ -786,7 +786,7 @@ int ext2fs_open (char *filename) { } len = __le32_to_cpu (fdiro->inode.size); ext2fs_file = fdiro; - return (len); + return (0); fail: ext2fs_free_node (fdiro, &ext2fs_root->diropen);