Lines Matching refs:sz_vol

5815 	LBA_t sz_vol, b_vol, b_fat, b_data;		/* Size of volume, Base LBA of volume, fat, data */  local
5862 b_vol = sz_vol = 0;
5882 sz_vol = ld_qword(buf + ofs + GPTE_LstLba) - b_vol + 1;
5895 sz_vol = ld_dword(pte + PTE_SizLba); /* Get volume size */
5898 if (disk_ioctl(pdrv, GET_SECTOR_COUNT, &sz_vol) != RES_OK) LEAVE_MKFS(FR_DISK_ERR);
5902 if (sz_vol >= FF_MIN_GPT) { /* Which partition type to create, MBR or GPT? */
5904 …b_vol = GPT_ALIGN / ss; sz_vol -= b_vol + GPT_ITEMS * SZ_GPTE / ss + 1; /* Estimated partition off…
5908 if (sz_vol > N_SEC_TRACK) {
5909 b_vol = N_SEC_TRACK; sz_vol -= b_vol; /* Estimated partition offset and size */
5914 if (sz_vol < 128) LEAVE_MKFS(FR_MKFS_ABORTED); /* Check if volume size is >=128s */
5920 …if ((fsopt & FM_ANY) == FM_EXFAT || sz_vol >= 0x4000000 || sz_au > 128) { /* exFAT only, vol >= 64…
5925 if (sz_vol >= 0x100000000) LEAVE_MKFS(FR_MKFS_ABORTED); /* Too large volume for FAT/FAT32 */
5937 vsn = (DWORD)sz_vol + GET_FATTIME(); /* VSN generated from current time and partitiion size */
5945 if (sz_vol < 0x1000) LEAVE_MKFS(FR_MKFS_ABORTED); /* Too small volume for exFAT? */
5947 …lba[0] = b_vol; lba[1] = b_vol + sz_vol - 1; /* Inform storage device that the volume area may be …
5953 if (sz_vol >= 0x80000) sz_au = 64; /* >= 512Ks */
5954 if (sz_vol >= 0x4000000) sz_au = 256; /* >= 64Ms */
5957 sz_fat = (DWORD)((sz_vol / sz_au + 2) * 4 + ss - 1) / ss; /* Number of FAT sectors */
5959 if (b_data - b_vol >= sz_vol / 2) LEAVE_MKFS(FR_MKFS_ABORTED); /* Too small volume? */
5960 n_clst = (DWORD)(sz_vol - (b_data - b_vol)) / sz_au; /* Number of clusters */
6062 st_qword(buf + BPB_TotSecEx, sz_vol); /* Volume size [sector] */
6106 n = (DWORD)sz_vol / 0x20000; /* Volume size in unit of 128KS */
6109 n_clst = (DWORD)sz_vol / pau; /* Number of clusters */
6116 n = (DWORD)sz_vol / 0x1000; /* Volume size in unit of 4KS */
6119 n_clst = (DWORD)sz_vol / pau;
6145 if (sz_vol < b_data + pau * 16 - b_vol) LEAVE_MKFS(FR_MKFS_ABORTED); /* Too small volume? */
6146 n_clst = ((DWORD)sz_vol - sz_rsv - sz_fat * n_fat - sz_dir) / pau;
6176 …lba[0] = b_vol; lba[1] = b_vol + sz_vol - 1; /* Inform storage device that the volume area may be …
6187 if (sz_vol < 0x10000) {
6188 st_word(buf + BPB_TotSec16, (WORD)sz_vol); /* Volume size in 16-bit LBA */
6190 st_dword(buf + BPB_TotSec32, (DWORD)sz_vol); /* Volume size in 32-bit LBA */
6266 if (sz_vol >= 0x10000) {
6284 lba[0] = sz_vol; lba[1] = 0;