Lines Matching refs:bpb

1456 	int silent, struct fat_bios_param_block *bpb)
1461 memset(bpb, 0, sizeof(*bpb));
1462 bpb->fat_sector_size = get_unaligned_le16(&b->sector_size);
1463 bpb->fat_sec_per_clus = b->sec_per_clus;
1464 bpb->fat_reserved = le16_to_cpu(b->reserved);
1465 bpb->fat_fats = b->fats;
1466 bpb->fat_dir_entries = get_unaligned_le16(&b->dir_entries);
1467 bpb->fat_sectors = get_unaligned_le16(&b->sectors);
1468 bpb->fat_fat_length = le16_to_cpu(b->fat_length);
1469 bpb->fat_total_sect = le32_to_cpu(b->total_sect);
1471 bpb->fat16_state = b->fat16.state;
1472 bpb->fat16_vol_id = get_unaligned_le32(b->fat16.vol_id);
1474 bpb->fat32_length = le32_to_cpu(b->fat32.length);
1475 bpb->fat32_root_cluster = le32_to_cpu(b->fat32.root_cluster);
1476 bpb->fat32_info_sector = le16_to_cpu(b->fat32.info_sector);
1477 bpb->fat32_state = b->fat32.state;
1478 bpb->fat32_vol_id = get_unaligned_le32(b->fat32.vol_id);
1481 if (!bpb->fat_reserved) {
1487 if (!bpb->fat_fats) {
1505 if (!is_power_of_2(bpb->fat_sector_size)
1506 || (bpb->fat_sector_size < 512)
1507 || (bpb->fat_sector_size > 4096)) {
1510 (unsigned)bpb->fat_sector_size);
1514 if (!is_power_of_2(bpb->fat_sec_per_clus)) {
1517 (unsigned)bpb->fat_sec_per_clus);
1521 if (bpb->fat_fat_length == 0 && bpb->fat32_length == 0) {
1535 struct fat_bios_param_block *bpb)
1584 memset(bpb, 0, sizeof(*bpb));
1585 bpb->fat_sector_size = SECTOR_SIZE;
1586 bpb->fat_sec_per_clus = fdefaults->sec_per_clus;
1587 bpb->fat_reserved = 1;
1588 bpb->fat_fats = 2;
1589 bpb->fat_dir_entries = fdefaults->dir_entries;
1590 bpb->fat_sectors = fdefaults->nr_sectors;
1591 bpb->fat_fat_length = fdefaults->fat_length;
1608 struct fat_bios_param_block bpb;
1656 &bpb);
1659 (struct fat_boot_sector *)bh->b_data, silent, &bpb);
1667 logical_sector_size = bpb.fat_sector_size;
1668 sbi->sec_per_clus = bpb.fat_sec_per_clus;
1700 sbi->fats = bpb.fat_fats;
1702 sbi->fat_start = bpb.fat_reserved;
1703 sbi->fat_length = bpb.fat_fat_length;
1716 if (!sbi->fat_length && bpb.fat32_length) {
1722 sbi->fat_length = bpb.fat32_length;
1723 sbi->root_cluster = bpb.fat32_root_cluster;
1726 sbi->fsinfo_sector = bpb.fat32_info_sector;
1756 sbi->vol_id = bpb.fat32_vol_id;
1758 sbi->vol_id = bpb.fat16_vol_id;
1764 sbi->dir_entries = bpb.fat_dir_entries;
1775 total_sectors = bpb.fat_sectors;
1777 total_sectors = bpb.fat_total_sect;
1786 sbi->dirty = bpb.fat32_state & FAT_STATE_DIRTY;
1788 sbi->dirty = bpb.fat16_state & FAT_STATE_DIRTY;