projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Complete shadowing
[yaffs2.git]
/
direct
/
dtest.c
diff --git
a/direct/dtest.c
b/direct/dtest.c
index 4d9cb894566d6a5c0cd8d986255fd45d2396517d..8100406266e582141b5834377d78c28d94d933bc 100644
(file)
--- a/
direct/dtest.c
+++ b/
direct/dtest.c
@@
-321,7
+321,7
@@
void fill_disk(char *path,int nfiles)
while ((result = yaffs_write(h,xx,600)) == 600)
{
while ((result = yaffs_write(h,xx,600)) == 600)
{
- f = yaffs_freespace(
"/boot"
);
+ f = yaffs_freespace(
path
);
}
result = yaffs_close(h);
printf(" close %d\n",result);
}
result = yaffs_close(h);
printf(" close %d\n",result);
@@
-1241,6
+1241,20
@@
int truncate_test(void)
+
+void fill_disk_test(const char *mountpt)
+{
+ int i;
+ yaffs_StartUp();
+
+ for(i = 0; i < 5; i++)
+ {
+ yaffs_mount(mountpt);
+ fill_disk_and_delete(mountpt,100,i+1);
+ yaffs_unmount(mountpt);
+ }
+
+}
void scan_deleted_files_test(const char *mountpt)
{
char fn[100];
void scan_deleted_files_test(const char *mountpt)
{
char fn[100];
@@
-1316,7
+1330,7
@@
int main(int argc, char *argv[])
//long_test_on_path("/ram2k");
//long_test_on_path("/flash");
//long_test_on_path("/ram2k");
//long_test_on_path("/flash");
-
scan_deleted_files
_test("/flash");
+
fill_disk
_test("/flash");