Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_dentry.c

    r0e7c3d9 rb2906c0  
    180180}
    181181
     182void fat_dentry_vollabel_get(const fat_dentry_t *d, char *buf)
     183{
     184        unsigned int i;
     185       
     186        for (i = 0; i < FAT_NAME_LEN; i++) {
     187                if (d->name[i] == FAT_PAD)
     188                        break;
     189               
     190                if (d->name[i] == FAT_DENTRY_E5_ESC)
     191                        *buf++ = 0xe5;
     192                else
     193                        *buf++ = d->name[i];
     194        }
     195       
     196        for (i = 0; i < FAT_EXT_LEN; i++) {
     197                if (d->ext[i] == FAT_PAD) {
     198                        *buf = '\0';
     199                        return;
     200                }
     201               
     202                if (d->ext[i] == FAT_DENTRY_E5_ESC)
     203                        *buf++ = 0xe5;
     204                else
     205                        *buf++ = d->ext[i];
     206        }
     207       
     208        *buf = '\0';
     209}
     210
    182211fat_dentry_clsf_t fat_classify_dentry(const fat_dentry_t *d)
    183212{
     
    191220        if (d->attr & FAT_ATTR_VOLLABEL) {
    192221                /* volume label entry */
    193                 return FAT_DENTRY_SKIP;
     222                return FAT_DENTRY_VOLLABEL;
    194223        }
    195224        if (d->name[0] == FAT_DENTRY_ERASED) {
     
    398427}
    399428
    400 size_t utf16_length(const uint16_t *wstr)
    401 {
    402         size_t len = 0;
    403        
    404         while (*wstr++ != 0)
    405                 len++;
    406        
    407         return len;
    408 }
    409 
    410429/**
    411430 * @}
Note: See TracChangeset for help on using the changeset viewer.