aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorLiu Aleaxander <Aleaxander@gmail.com>2009-05-19 16:09:37 +0800
committerLiu Aleaxander <Aleaxander@gmail.com>2009-05-19 16:09:37 +0800
commit88a72896dc32cc4a2a79b962af6b21ec5d442333 (patch)
treeb6869030be29b105edc4c5053de29c8f5fb1588a /main.c
parentd79c1c9fc74b867b2a060f909b62cc7c1b7dfdac (diff)
downloaddevel-88a72896dc32cc4a2a79b962af6b21ec5d442333.tar.gz
devel-88a72896dc32cc4a2a79b962af6b21ec5d442333.tar.xz
devel-88a72896dc32cc4a2a79b962af6b21ec5d442333.zip
Finally, It can do some work.
yeah, It can compile correctly, but somehow with some bugs, like it can correctly open the /ldlinux.sys file. So I need do more debug tomorrow. What's make me happy is that it can handle long file name:), so it can work somehow.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 9d1cb3c..2c1be74 100644
--- a/main.c
+++ b/main.c
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
init_fs(&sb);
- file = (struct open_file_t *)ext2_open(filename);
+ file = (struct open_file_t *)open_file(filename);
if ( ! file ) {
printf("open file error: file %s not found ....\n", filename);
close(fd);
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
* going well.
*/
do {
- bytes_read = ext2_read(file, buf, 1024, &have_more);
+ bytes_read = read_file(file, buf, 1024, &have_more);
printf("--------read %d bytes-------\n", bytes_read);
printf("----------------\n");
print_hex(buf, bytes_read);