Browse Source

change fat32 to ignore volume lable.

master
root 16 years ago
parent
commit
b8f024e3f2
  1. 8
      Targets/Bonito2fdev/Bonito/start_cs5536.S
  2. 5
      pmon/fs/fatfs.c

8
Targets/Bonito2fdev/Bonito/start_cs5536.S

@ -2240,10 +2240,16 @@ LEAF(i2cread)
/* read data */
IO_READ_BYTE(SMB_BASE_ADDR | SMB_SDA);
b 1f;
nop;
i2cerr :
nop;
li v0, 0x02;
IO_WRITE_BYTE(SMB_BASE_ADDR | SMB_CTRL1);
li v0, 0x10;
IO_WRITE_BYTE(SMB_BASE_ADDR | SMB_STS);
1:
jr ra;
nop;
END(i2cread)

5
pmon/fs/fatfs.c

@ -122,7 +122,6 @@ fat_open(int fd, const char *path, int flags, int mode)
/* Set opath to point at the isolated filname path */
filename = strchr(opath, '/') + 1;
printf("dpath=%s,filename=%s\n",dpath,filename);
fsc = (struct fat_sc *)malloc(sizeof(struct fat_sc));
if (fsc == NULL) {
@ -604,6 +603,8 @@ int fat_findfile(struct fat_sc *fsc, char *name)
{
continue;
}
if(dire->dirAttributes == ATTR_VOLUME)
continue;
if(dire->dirAttributes == ATTR_DIRECTORY)
{
@ -709,6 +710,8 @@ int fat_subdirscan(struct fat_sc *fsc, char *name, struct fatchain *chain)
if (dire->dirName[0] == SLOT_DELETED)
continue;
if(dire->dirAttributes == ATTR_VOLUME)
continue;
if(dire->dirAttributes == ATTR_DIRECTORY)
{
dir_flag = 1;

Loading…
Cancel
Save