Lines Matching refs:bs
478 read_bootsectandvi(boot_sector *bs, volume_info *volinfo, int *fatsize) in read_bootsectandvi() argument
500 memcpy(bs, block, sizeof(boot_sector)); in read_bootsectandvi()
501 bs->reserved = FAT2CPU16(bs->reserved); in read_bootsectandvi()
502 bs->fat_length = FAT2CPU16(bs->fat_length); in read_bootsectandvi()
503 bs->secs_track = FAT2CPU16(bs->secs_track); in read_bootsectandvi()
504 bs->heads = FAT2CPU16(bs->heads); in read_bootsectandvi()
505 bs->total_sect = FAT2CPU32(bs->total_sect); in read_bootsectandvi()
508 if (bs->fat_length == 0) { in read_bootsectandvi()
510 bs->fat32_length = FAT2CPU32(bs->fat32_length); in read_bootsectandvi()
511 bs->flags = FAT2CPU16(bs->flags); in read_bootsectandvi()
512 bs->root_cluster = FAT2CPU32(bs->root_cluster); in read_bootsectandvi()
513 bs->info_sector = FAT2CPU16(bs->info_sector); in read_bootsectandvi()
514 bs->backup_boot = FAT2CPU16(bs->backup_boot); in read_bootsectandvi()
518 vistart = (volume_info *)&(bs->fat32_length); in read_bootsectandvi()
547 boot_sector bs; in get_fs_info() local
551 ret = read_bootsectandvi(&bs, &volinfo, &mydata->fatsize); in get_fs_info()
558 mydata->fatlength = bs.fat32_length; in get_fs_info()
559 mydata->total_sect = bs.total_sect; in get_fs_info()
561 mydata->fatlength = bs.fat_length; in get_fs_info()
562 mydata->total_sect = (bs.sectors[1] << 8) + bs.sectors[0]; in get_fs_info()
564 mydata->total_sect = bs.total_sect; in get_fs_info()
569 mydata->fats = bs.fats; in get_fs_info()
570 mydata->fat_sect = bs.reserved; in get_fs_info()
572 mydata->rootdir_sect = mydata->fat_sect + mydata->fatlength * bs.fats; in get_fs_info()
574 mydata->sect_size = (bs.sector_size[1] << 8) + bs.sector_size[0]; in get_fs_info()
575 mydata->clust_size = bs.cluster_size; in get_fs_info()
596 mydata->root_cluster = bs.root_cluster; in get_fs_info()
598 mydata->rootdir_size = ((bs.dir_entries[1] * (int)256 + in get_fs_info()
599 bs.dir_entries[0]) * in get_fs_info()
1016 boot_sector bs; in file_fat_detectfs() local
1062 if (read_bootsectandvi(&bs, &volinfo, &fatsize)) { in file_fat_detectfs()