Changeset 09c954b in mainline for uspace/app/mkexfat/mkexfat.c


Ignore:
Timestamp:
2012-02-26T22:06:42Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3df2907
Parents:
aa37d6f
Message:

mkexfat: Bug fixes

  • Fix the number of data clusters.
  • Set the serial number to a value != 0.
  • Fix volume label.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkexfat/mkexfat.c

    raa37d6f r09c954b  
    252252
    253253        mbs->data_clusters = host2uint32_t_le(cfg->total_clusters -
    254             div_round_up(cfg->data_start_sector, cfg->cluster_size));
     254            div_round_up(cfg->data_start_sector * cfg->sector_size,
     255            cfg->cluster_size));
    255256
    256257        mbs->rootdir_cluster = host2uint32_t_le(cfg->rootdir_cluster);
    257         mbs->volume_serial = 0;
     258        mbs->volume_serial = host2uint32_t_le(0xe1028172);
    258259        mbs->version.major = 1;
    259260        mbs->version.minor = 0;
     
    597598        /* Initialize the volume label dentry */
    598599        d->type = EXFAT_TYPE_VOLLABEL;
    599         str_to_utf16(d->vollabel.label, 7, "HELENOS");
    600         d->vollabel.size = 7;
     600        str_to_utf16(d->vollabel.label, 8, "HELENOS ");
     601        d->vollabel.size = 8;
    601602
    602603        d++;
Note: See TracChangeset for help on using the changeset viewer.