Changeset f4ae95a in mainline for uspace/srv/fs/fat/fat_ops.c


Ignore:
Timestamp:
2017-07-02T16:22:09Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a927398
Parents:
ee50130
Message:

mkfat needs to be able to set the volume label. fat FS should ignore volume label in the boot sector.

File:
1 edited

Legend:

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

    ree50130 rf4ae95a  
    10391039static int fat_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
    10401040{
    1041         fat_bs_t *bs;
    10421041        fat_idx_t *ridxp;
    10431042        fs_node_t *rfn;
     
    10451044        fat_directory_t di;
    10461045        char label[FAT_VOLLABEL_LEN + 1];
    1047         int i;
    10481046        int rc;
    10491047
     
    10601058        rc = fat_directory_vollabel_get(&di, label);
    10611059        if (rc != EOK) {
    1062                 /* No label in root directory. Read label from the BS */
    1063                 bs = block_bb_get(service_id);
    1064                 i = FAT_VOLLABEL_LEN;
    1065                 while (i > 0 && bs->label[i - 1] == FAT_PAD)
    1066                         --i;
    1067 
    1068                 /* XXX Deal with non-ASCII characters */
    1069                 memcpy(label, bs->label, i);
    1070                 label[i] = '\0';
     1060                if (rc != ENOENT)
     1061                        return rc;
     1062
     1063                label[0] = '\0';
    10711064        }
    10721065
Note: See TracChangeset for help on using the changeset viewer.