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

Changeset 81e20c7 in mainline


Ignore:
Timestamp:
2011-08-25T21:20:31Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
abb7491c
Parents:
462b418
Message:

Fix computation of cfg.total_sectors.

File:
1 edited

Legend:

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

    r462b418 r81e20c7  
    180180                printf(NAME ": Block device has %" PRIuOFF64 " blocks.\n",
    181181                    dev_nblocks);
    182                 if (dev_nblocks < cfg.total_sectors)
     182                if (!cfg.total_sectors || dev_nblocks < cfg.total_sectors)
    183183                        cfg.total_sectors = dev_nblocks;
    184184        }
Note: See TracChangeset for help on using the changeset viewer.