fat: fix setting wrong file name
authorDonggeun Kim <dg77.kim@samsung.com>
Mon, 29 Nov 2010 05:40:55 +0000 (14:40 +0900)
committerDonggeun Kim <dg77.kim@samsung.com>
Mon, 29 Nov 2010 05:40:55 +0000 (14:40 +0900)
When file_fat_write function is called multiple times,
the file names are not set correctly since the second function call.
This patch fix the bug.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
fs/fat/fat.c

index 644aa50..d9044b2 100644 (file)
@@ -708,6 +708,7 @@ fill_dir_slot (dir_entry **dentptr, const char *l_name)
        int idx = 0, ret;
 
        do {
+               memset(slotptr, 0x00, sizeof(dir_slot));
                ret = str2slot(slotptr, l_name, &idx);
                slotptr->id = ++counter;
                slotptr->attr = ATTR_VFAT;