umount and fat fixes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@227 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-05-14 11:12:09 +00:00
parent 11073f798f
commit b94766ca8f
7 changed files with 116 additions and 27 deletions
+12 -1
View File
@@ -108,10 +108,21 @@ int user_start(int argc, char *argv[])
}
else
{
char buffer[128];
int nbytes = read(fd, buffer, 128);
if (nbytes < 0)
{
printf("main: failed to read from %s, errno=%d\n", g_testfile1, *get_errno_ptr());
}
else
{
buffer[127]='\0';
printf("main: Read \"%s\" from %s\n", buffer, g_testfile1);
}
close(fd);
}
printf("main: opening %s for reading\n", g_testfile2);
printf("main: opening %s for writing\n", g_testfile2);
fd = open(g_testfile2, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (fd < 0)