Lines Matching refs:pmp
145 /* Byte offset in FAT on filesystem pmp, cluster cn */
146 #define FATOFS(pmp, cn) ((cn) * (pmp)->pm_fatmult / (pmp)->pm_fatdiv)
170 #define bptoep(pmp, bp, dirofs) \
172 + ((dirofs) & (pmp)->pm_crbomask)))
177 #define de_bn2cn(pmp, bn) \
178 ((bn) >> ((pmp)->pm_cnshift - (pmp)->pm_bnshift))
183 #define de_cn2bn(pmp, cn) \
184 ((cn) << ((pmp)->pm_cnshift - (pmp)->pm_bnshift))
189 #define de_bn2kb(pmp, bn) \
190 ((bn) << ((pmp)->pm_bnshift - DEV_BSHIFT))
195 #define de_kb2bn(pmp, kb) \
196 ((kb) >> ((pmp)->pm_bnshift - DEV_BSHIFT))
201 #define de_cluster(pmp, off) \
202 ((off) >> (pmp)->pm_cnshift)
207 #define de_clcount(pmp, size) \
208 (((size) + (pmp)->pm_bpcluster - 1) >> (pmp)->pm_cnshift)
213 #define de_blk(pmp, off) \
214 (de_cn2bn(pmp, de_cluster((pmp), (off))))
219 #define de_cn2off(pmp, cn) \
220 ((cn) << (pmp)->pm_cnshift)
225 #define de_bn2off(pmp, bn) \
226 ((bn) << (pmp)->pm_bnshift)
230 #define cntobn(pmp, cn) \
231 (de_cn2bn((pmp), (cn)-CLUST_FIRST) + (pmp)->pm_firstcluster)
236 #define roottobn(pmp, dirofs) \
237 (de_blk((pmp), (dirofs)) + (pmp)->pm_rootdirblk)
243 #define detobn(pmp, dirclu, dirofs) \
245 ? roottobn((pmp), (dirofs)) \
246 : cntobn((pmp), (dirclu)))