1 extern void abort (void);
9 #define _RNDUP(x, unit) ((((x) + (unit) - 1) / (unit)) * (unit))
10 #define _RNDDOWN(x, unit) ((x) - ((x)%(unit)))
13 foo (foo_t
*const pxp
, long long offset
, unsigned int extent
)
15 long long blkoffset
= _RNDDOWN(offset
, (long long )pxp
->blksz
);
16 unsigned int diff
= (unsigned int)(offset
- blkoffset
);
17 unsigned int blkextent
= _RNDUP(diff
+ extent
, pxp
->blksz
);
19 if (pxp
->blksz
< blkextent
)
22 if (pxp
->bf_cnt
> pxp
->blksz
)
23 pxp
->bf_cnt
= pxp
->blksz
;
36 xx
= foo (&x
, 0, 4096);