Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f5f1e1c in mainline


Ignore:
Timestamp:
2011-07-18T11:32:12Z (10 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master
Children:
5dac8ab
Parents:
1f78546
Message:

exFAT: fix exfat_directory_read_file

Location:
uspace/srv/fs/exfat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/exfat/exfat_directory.c

    r1f78546 rf5f1e1c  
    180180
    181181
    182 int exfat_directory_read_file(exfat_directory_t *di, char *name, exfat_file_dentry_t *df, exfat_stream_dentry_t *ds)
     182int exfat_directory_read_file(exfat_directory_t *di, char *name, size_t size,
     183    exfat_file_dentry_t *df, exfat_stream_dentry_t *ds)
    183184{
    184185        uint16_t wname[EXFAT_FILENAME_LEN+1];
     
    201202                return ENOENT;
    202203        *ds  = d->stream;
    203 /*     
    204         if (ds->name_size > EXFAT_FILENAME_LEN)
     204       
     205        if (ds->name_size > size)
    205206                return EOVERFLOW;
    206 */
     207
    207208        for (i=0; i<df->count-1; i++) {
    208209                rc = exfat_directory_next(di);
     
    216217                exfat_dentry_get_name(&d->name, ds->name_size, wname, &offset);
    217218        }
    218         rc = utf16_to_str(name, EXFAT_FILENAME_LEN, wname);
     219        rc = utf16_to_str(name, size, wname);
    219220        if (rc != EOK)
    220221                return rc;
  • uspace/srv/fs/exfat/exfat_directory.h

    r1f78546 rf5f1e1c  
    6363    exfat_dentry_clsf_t type, exfat_dentry_t **d);
    6464
    65 extern int exfat_directory_read_file(exfat_directory_t *di, char *name, exfat_file_dentry_t *df,
    66     exfat_stream_dentry_t *ds);
     65extern int exfat_directory_read_file(exfat_directory_t *di, char *name,
     66    size_t size, exfat_file_dentry_t *df, exfat_stream_dentry_t *ds);
    6767
    6868
Note: See TracChangeset for help on using the changeset viewer.