Lines Matching defs:pos

218  * @pos: bit position at which to pack (passed and next position returned)
222 static void pack_bits(const struct ubifs_info *c, uint8_t **addr, int *pos, uint32_t val, int nrbits)
225 int b = *pos;
229 ubifs_assert(c, *pos >= 0);
230 ubifs_assert(c, *pos < 8);
261 *pos = b;
268 * @pos: bit position at which to unpack (passed and next position returned)
273 uint32_t ubifs_unpack_bits(const struct ubifs_info *c, uint8_t **addr, int *pos, int nrbits)
277 int b = *pos;
283 ubifs_assert(c, *pos >= 0);
284 ubifs_assert(c, *pos < 8);
329 *pos = b;
344 int i, pos = 0;
347 pack_bits(c, &addr, &pos, UBIFS_LPT_PNODE, UBIFS_LPT_TYPE_BITS);
349 pack_bits(c, &addr, &pos, pnode->num, c->pcnt_bits);
351 pack_bits(c, &addr, &pos, pnode->lprops[i].free >> 3,
353 pack_bits(c, &addr, &pos, pnode->lprops[i].dirty >> 3,
356 pack_bits(c, &addr, &pos, 1, 1);
358 pack_bits(c, &addr, &pos, 0, 1);
363 pos = 0;
364 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
377 int i, pos = 0;
380 pack_bits(c, &addr, &pos, UBIFS_LPT_NNODE, UBIFS_LPT_TYPE_BITS);
382 pack_bits(c, &addr, &pos, nnode->num, c->pcnt_bits);
388 pack_bits(c, &addr, &pos, lnum - c->lpt_first, c->lpt_lnum_bits);
389 pack_bits(c, &addr, &pos, nnode->nbranch[i].offs,
395 pos = 0;
396 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
409 int i, pos = 0;
412 pack_bits(c, &addr, &pos, UBIFS_LPT_LTAB, UBIFS_LPT_TYPE_BITS);
414 pack_bits(c, &addr, &pos, ltab[i].free, c->lpt_spc_bits);
415 pack_bits(c, &addr, &pos, ltab[i].dirty, c->lpt_spc_bits);
420 pos = 0;
421 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
433 int i, pos = 0;
436 pack_bits(c, &addr, &pos, UBIFS_LPT_LSAVE, UBIFS_LPT_TYPE_BITS);
438 pack_bits(c, &addr, &pos, lsave[i], c->lnum_bits);
442 pos = 0;
443 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
926 int pos = 0;
930 crc = ubifs_unpack_bits(c, &addr, &pos, UBIFS_LPT_CRC_BITS);
946 * @pos: position of type bit field is passed and returned updated here
952 int *pos, int type)
956 node_type = ubifs_unpack_bits(c, addr, pos, UBIFS_LPT_TYPE_BITS);
978 int i, pos = 0, err;
980 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_PNODE);
984 pnode->num = ubifs_unpack_bits(c, &addr, &pos, c->pcnt_bits);
988 lprops->free = ubifs_unpack_bits(c, &addr, &pos, c->space_bits);
990 lprops->dirty = ubifs_unpack_bits(c, &addr, &pos, c->space_bits);
993 if (ubifs_unpack_bits(c, &addr, &pos, 1))
1015 int i, pos = 0, err;
1017 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_NNODE);
1021 nnode->num = ubifs_unpack_bits(c, &addr, &pos, c->pcnt_bits);
1025 lnum = ubifs_unpack_bits(c, &addr, &pos, c->lpt_lnum_bits) +
1030 nnode->nbranch[i].offs = ubifs_unpack_bits(c, &addr, &pos,
1047 int i, pos = 0, err;
1049 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_LTAB);
1053 int free = ubifs_unpack_bits(c, &addr, &pos, c->lpt_spc_bits);
1054 int dirty = ubifs_unpack_bits(c, &addr, &pos, c->lpt_spc_bits);
1079 int i, pos = 0, err;
1081 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_LSAVE);
1085 int lnum = ubifs_unpack_bits(c, &addr, &pos, c->lnum_bits);