changeset 223:93417be1750a

Fix permissions on test files
author charles
date Tue, 19 Aug 2008 22:47:44 +0100
parents bd1f223d2347
children 88c51f5947b9
files direct/dtest.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/direct/dtest.c
+++ b/direct/dtest.c
@@ -941,9 +941,11 @@ void rename_over_test(const char *mountp
 	int i;
 	char a[100];
 	char b[100];
+	char c[100];
 	
 	sprintf(a,"%s/a",mountpt);
 	sprintf(b,"%s/b",mountpt);
+	sprintf(c,"%s/c",mountpt);
 	
 	yaffs_StartUp();
 	
@@ -953,9 +955,13 @@ void rename_over_test(const char *mountp
 	dumpDirFollow(mountpt);
 	
 	
-	i = yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR, 0); 
+	
+	i = yaffs_open(c,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
+	printf("File c handle is %d\n",i);
 	yaffs_close(i);
-	i = yaffs_open(b,O_CREAT | O_TRUNC | O_RDWR, 0);
+	i = yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR,  S_IREAD | S_IWRITE); 
+	yaffs_close(i);
+	i = yaffs_open(b,O_CREAT | O_TRUNC | O_RDWR,  S_IREAD | S_IWRITE);
 	yaffs_close(i);
 	yaffs_rename(a,b); // rename over
 	yaffs_rename(b,a); // rename back again (not renaimng over)