Lines Matching refs:bpb
1455 int silent, struct fat_bios_param_block *bpb)
1460 memset(bpb, 0, sizeof(*bpb));
1461 bpb->fat_sector_size = get_unaligned_le16(&b->sector_size);
1462 bpb->fat_sec_per_clus = b->sec_per_clus;
1463 bpb->fat_reserved = le16_to_cpu(b->reserved);
1464 bpb->fat_fats = b->fats;
1465 bpb->fat_dir_entries = get_unaligned_le16(&b->dir_entries);
1466 bpb->fat_sectors = get_unaligned_le16(&b->sectors);
1467 bpb->fat_fat_length = le16_to_cpu(b->fat_length);
1468 bpb->fat_total_sect = le32_to_cpu(b->total_sect);
1470 bpb->fat16_state = b->fat16.state;
1471 bpb->fat16_vol_id = get_unaligned_le32(b->fat16.vol_id);
1473 bpb->fat32_length = le32_to_cpu(b->fat32.length);
1474 bpb->fat32_root_cluster = le32_to_cpu(b->fat32.root_cluster);
1475 bpb->fat32_info_sector = le16_to_cpu(b->fat32.info_sector);
1476 bpb->fat32_state = b->fat32.state;
1477 bpb->fat32_vol_id = get_unaligned_le32(b->fat32.vol_id);
1480 if (!bpb->fat_reserved) {
1486 if (!bpb->fat_fats) {
1504 if (!is_power_of_2(bpb->fat_sector_size)
1505 || (bpb->fat_sector_size < 512)
1506 || (bpb->fat_sector_size > 4096)) {
1509 (unsigned)bpb->fat_sector_size);
1513 if (!is_power_of_2(bpb->fat_sec_per_clus)) {
1516 (unsigned)bpb->fat_sec_per_clus);
1520 if (bpb->fat_fat_length == 0 && bpb->fat32_length == 0) {
1534 struct fat_bios_param_block *bpb)
1580 memset(bpb, 0, sizeof(*bpb));
1581 bpb->fat_sector_size = SECTOR_SIZE;
1582 bpb->fat_sec_per_clus = fdefaults->sec_per_clus;
1583 bpb->fat_reserved = 1;
1584 bpb->fat_fats = 2;
1585 bpb->fat_dir_entries = fdefaults->dir_entries;
1586 bpb->fat_sectors = fdefaults->nr_sectors;
1587 bpb->fat_fat_length = fdefaults->fat_length;
1604 struct fat_bios_param_block bpb;
1652 &bpb);
1655 (struct fat_boot_sector *)bh->b_data, silent, &bpb);
1663 logical_sector_size = bpb.fat_sector_size;
1664 sbi->sec_per_clus = bpb.fat_sec_per_clus;
1696 sbi->fats = bpb.fat_fats;
1698 sbi->fat_start = bpb.fat_reserved;
1699 sbi->fat_length = bpb.fat_fat_length;
1712 if (!sbi->fat_length && bpb.fat32_length) {
1718 sbi->fat_length = bpb.fat32_length;
1719 sbi->root_cluster = bpb.fat32_root_cluster;
1722 sbi->fsinfo_sector = bpb.fat32_info_sector;
1752 sbi->vol_id = bpb.fat32_vol_id;
1754 sbi->vol_id = bpb.fat16_vol_id;
1760 sbi->dir_entries = bpb.fat_dir_entries;
1771 total_sectors = bpb.fat_sectors;
1773 total_sectors = bpb.fat_total_sect;
1782 sbi->dirty = bpb.fat32_state & FAT_STATE_DIRTY;
1784 sbi->dirty = bpb.fat16_state & FAT_STATE_DIRTY;