[U-Boot-Users] PATCH: get_dentfromdir (FAT)

Leon KUKOVEC leon.kukovec at ultra.si
Fri Mar 12 11:12:15 CET 2004


Fixes:
	o 'fatls' no longer lists deleted files as "/"
Changes:
	o get_dentfromdir correctly handles deleted dentries

Any issues, let me know.

-- 

Best Regards,
	Leon.
-------------- next part --------------
diff -purN u-boot-top/fs/fat/fat.c u-boot/fs/fat/fat.c
--- u-boot-top/fs/fat/fat.c	2004-03-12 10:57:57.000000000 +0100
+++ u-boot/fs/fat/fat.c	2004-03-12 10:57:35.000000000 +0100
@@ -535,6 +535,10 @@ static dir_entry *get_dentfromdir (fsdat
 	    char s_name[14], l_name[256];
 
 	    l_name[0] = '\0';
+	    if (dentptr->name[0] == DELETED_FLAG) {
+		    dentptr++;
+		    continue;
+	    }
 	    if ((dentptr->attr & ATTR_VOLUME)) {
 #ifdef CONFIG_SUPPORT_VFAT
 		if ((dentptr->attr & ATTR_VFAT) &&


More information about the U-Boot mailing list