Lines Matching refs:win

1050 		if (disk_write(fs->pdrv, fs->win, fs->winsect, 1) == RES_OK) {	/* Write back the window */  in sync_window()
1053 …if (fs->n_fats == 2) disk_write(fs->pdrv, fs->win, fs->winsect + fs->fsize, 1); /* Reflect it to 2… in sync_window()
1077 if (disk_read(fs->pdrv, fs->win, sector, 1) != RES_OK) { in move_window()
1106 mem_set(fs->win, 0, sizeof fs->win); in sync_fs()
1107 st_word(fs->win + BS_55AA, 0xAA55); in sync_fs()
1108 st_dword(fs->win + FSI_LeadSig, 0x41615252); in sync_fs()
1109 st_dword(fs->win + FSI_StrucSig, 0x61417272); in sync_fs()
1110 st_dword(fs->win + FSI_Free_Count, fs->free_clst); in sync_fs()
1111 st_dword(fs->win + FSI_Nxt_Free, fs->last_clst); in sync_fs()
1114 disk_write(fs->pdrv, fs->win, fs->winsect, 1); in sync_fs()
1169 wc = fs->win[bc++ % SS(fs)]; /* Get 1st byte of the entry */ in get_fat()
1171 wc |= fs->win[bc % SS(fs)] << 8; /* Merge 2nd byte of the entry */ in get_fat()
1177 val = ld_word(fs->win + clst * 2 % SS(fs)); /* Simple WORD array */ in get_fat()
1182 …val = ld_dword(fs->win + clst * 4 % SS(fs)) & 0x0FFFFFFF; /* Simple DWORD array but mask out upper… in get_fat()
1203 val = ld_dword(fs->win + clst * 4 % SS(fs)) & 0x7FFFFFFF; in get_fat()
1243 p = fs->win + bc++ % SS(fs); in put_fat()
1248 p = fs->win + bc % SS(fs); in put_fat()
1256 st_word(fs->win + clst * 2 % SS(fs), (WORD)val); /* Simple WORD array */ in put_fat()
1267 val = (val & 0x0FFFFFFF) | (ld_dword(fs->win + clst * 4 % SS(fs)) & 0xF0000000); in put_fat()
1269 st_dword(fs->win + clst * 4 % SS(fs), val); in put_fat()
1310 bv = fs->win[i] & bm; bm <<= 1; /* Get bit value */ in find_bitmap()
1351 if (bv == (int)((fs->win[i] & bm) != 0)) return FR_INT_ERR; /* Is the bit expected value? */ in change_bitmap()
1352 fs->win[i] ^= bm; /* Flip the bit */ in change_bitmap()
1657 mem_set(fs->win, 0, sizeof fs->win); /* Clear window buffer */ in dir_clear()
1669 ibuf = fs->win; szb = 1; /* Use window buffer (many single-sector writes may take a time) */ in dir_clear()
1719 dp->dir = fs->win + (ofs % SS(fs)); /* Pointer to the entry in the win[] */ in dir_sdi()
1779 dp->dir = fs->win + ofs % SS(fs); /* Pointer to the entry in the win[] */ in dir_next()
3098 dp->obj.sclust = ld_clust(fs, fs->win + dp->dptr % SS(fs)); /* Open next directory */
3195 …if (ld_word(fs->win + BS_55AA) != 0xAA55) return 3; /* Check boot record signature (always here re…
3198 …if (!mem_cmp(fs->win + BS_JmpBoot, "\xEB\x76\x90" "EXFAT ", 11)) return 1; /* Check if exFAT VBR…
3200 …if (fs->win[BS_JmpBoot] == 0xE9 || fs->win[BS_JmpBoot] == 0xEB || fs->win[BS_JmpBoot] == 0xE8) { /…
3201 if (!mem_cmp(fs->win + BS_FilSysType, "FAT", 3)) return 0; /* Is it an FAT VBR? */
3202 if (!mem_cmp(fs->win + BS_FilSysType32, "FAT32", 5)) return 0; /* Is it an FAT32 VBR? */
3275 pt = fs->win + (MBR_Table + i * SZ_PTE);
3295 for (i = BPB_ZeroedEx; i < BPB_ZeroedEx + 53 && fs->win[i] == 0; i++) ; /* Check zero filler */
3298 …if (ld_word(fs->win + BPB_FSVerEx) != 0x100) return FR_NO_FILESYSTEM; /* Check exFAT version (must…
3300 …if (1 << fs->win[BPB_BytsPerSecEx] != SS(fs)) { /* (BPB_BytsPerSecEx must be equal to the physical…
3304 maxlba = ld_qword(fs->win + BPB_TotSecEx) + bsect; /* Last LBA + 1 of the volume */
3307 fs->fsize = ld_dword(fs->win + BPB_FatSzEx); /* Number of sectors per FAT */
3309 fs->n_fats = fs->win[BPB_NumFATsEx]; /* Number of FATs */
3312 fs->csize = 1 << fs->win[BPB_SecPerClusEx]; /* Cluster size */
3315 nclst = ld_dword(fs->win + BPB_NumClusEx); /* Number of clusters */
3321 fs->database = bsect + ld_dword(fs->win + BPB_DataOfsEx);
3322 fs->fatbase = bsect + ld_dword(fs->win + BPB_FatOfsEx);
3324 fs->dirbase = ld_dword(fs->win + BPB_RootClusEx);
3334 if (fs->win[i] == ET_BITMAP) break; /* Is it a bitmap entry? */
3337 bcl = ld_dword(fs->win + i + 20); /* Bitmap cluster */
3342 cv = ld_dword(fs->win + bcl % (SS(fs) / 4) * 4);
3354 …if (ld_word(fs->win + BPB_BytsPerSec) != SS(fs)) return FR_NO_FILESYSTEM; /* (BPB_BytsPerSec must …
3356 fasize = ld_word(fs->win + BPB_FATSz16); /* Number of sectors per FAT */
3357 if (fasize == 0) fasize = ld_dword(fs->win + BPB_FATSz32);
3360 fs->n_fats = fs->win[BPB_NumFATs]; /* Number of FATs */
3364 fs->csize = fs->win[BPB_SecPerClus]; /* Cluster size */
3367 fs->n_rootdir = ld_word(fs->win + BPB_RootEntCnt); /* Number of root directory entries */
3370 tsect = ld_word(fs->win + BPB_TotSec16); /* Number of sectors on the volume */
3371 if (tsect == 0) tsect = ld_dword(fs->win + BPB_TotSec32);
3373 nrsv = ld_word(fs->win + BPB_RsvdSecCnt); /* Number of reserved sectors */
3393 …if (ld_word(fs->win + BPB_FSVer32) != 0) return FR_NO_FILESYSTEM; /* (Must be FAT32 revision 0.0) …
3395 fs->dirbase = ld_dword(fs->win + BPB_RootClus32); /* Root directory start cluster */
3411 && ld_word(fs->win + BPB_FSInfo32) == 1
3415 if (ld_word(fs->win + BS_55AA) == 0xAA55 /* Load FSInfo data if available */
3416 && ld_dword(fs->win + FSI_LeadSig) == 0x41615252
3417 && ld_dword(fs->win + FSI_StrucSig) == 0x61417272)
3420 fs->free_clst = ld_dword(fs->win + FSI_Free_Count);
3423 fs->last_clst = ld_dword(fs->win + FSI_Nxt_Free);
3792 mem_cpy(rbuff + ((fs->winsect - sect) * SS(fs)), fs->win, SS(fs));
3820 mem_cpy(rbuff, fs->win + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
3907 mem_cpy(fs->win, wbuff + ((fs->winsect - sect) * SS(fs)), SS(fs));
3938 mem_cpy(fs->win + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
4679 for (b = 8, bm = fs->win[i]; b && clst; b--, clst--) {
4697 if (ld_word(fs->win + i) == 0) nfree++;
4700 if ((ld_dword(fs->win + i) & 0x0FFFFFFF) == 0) nfree++;
4900 mem_set(fs->win + DIR_Name, ' ', 11); /* Create "." entry */
4901 fs->win[DIR_Name] = '.';
4902 fs->win[DIR_Attr] = AM_DIR;
4903 st_dword(fs->win + DIR_ModTime, tm);
4904 st_clust(fs, fs->win, dcl);
4905 mem_cpy(fs->win + SZDIRE, fs->win, SZDIRE); /* Create ".." entry */
4906 fs->win[SZDIRE + 1] = '.'; pcl = dj.obj.sclust;
4907 st_clust(fs, fs->win + SZDIRE, pcl);
5025 dir = fs->win + SZDIRE * 1; /* Ptr to .. entry */
5236 *vsn = ld_dword(fs->win + di);
5500 dbuf = fs->win;