fs: fat: assign rootdir sector when accessing root directory
This fixes problems accessing drives formated under
Windows as FAT16.
Signed-off-by: Thomas RIENOESSL <thomas.rienoessl@bachmann.info>
[trini: Rebase on top of f528c140c8]
Signed-off-by: Tom Rini <trini@konsulko.com>
			
			
This commit is contained in:
		
							parent
							
								
									2fa77bd125
								
							
						
					
					
						commit
						a68b0e11ea
					
				|  | @ -725,6 +725,9 @@ static void *next_cluster(fat_itr *itr) | |||
| 	if (itr->last_cluster) | ||||
| 		return NULL; | ||||
| 
 | ||||
| 	if (itr->fsdata->fatsize != 32 && itr->is_root) | ||||
| 		sect = mydata->rootdir_sect; | ||||
| 	else | ||||
| 		sect = clust_to_sect(itr->fsdata, itr->next_clust); | ||||
| 
 | ||||
| 	debug("FAT read(sect=%d), clust_size=%d, DIRENTSPERBLOCK=%zd\n", | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue