Lines Matching refs:buf

376 	void *buf = c->lpt_buf;  in write_cnodes()  local
395 ubifs_pack_lsave(c, buf + offs, c->lsave); in write_cnodes()
402 ubifs_pack_ltab(c, buf + offs, c->ltab_cmt); in write_cnodes()
417 memset(buf + offs, 0xff, alen - wlen); in write_cnodes()
418 err = ubifs_leb_write(c, lnum, buf + from, from, in write_cnodes()
436 ubifs_pack_lsave(c, buf + offs, c->lsave); in write_cnodes()
443 ubifs_pack_ltab(c, buf + offs, c->ltab_cmt); in write_cnodes()
451 ubifs_pack_nnode(c, buf + offs, in write_cnodes()
454 ubifs_pack_pnode(c, buf + offs, in write_cnodes()
476 memset(buf + offs, 0xff, alen - wlen); in write_cnodes()
477 err = ubifs_leb_write(c, lnum, buf + from, from, alen); in write_cnodes()
492 ubifs_pack_lsave(c, buf + offs, c->lsave); in write_cnodes()
502 memset(buf + offs, 0xff, alen - wlen); in write_cnodes()
503 err = ubifs_leb_write(c, lnum, buf + from, from, alen); in write_cnodes()
517 ubifs_pack_ltab(c, buf + offs, c->ltab_cmt); in write_cnodes()
525 memset(buf + offs, 0xff, alen - wlen); in write_cnodes()
526 err = ubifs_leb_write(c, lnum, buf + from, from, alen); in write_cnodes()
1080 static int get_pad_len(const struct ubifs_info *c, uint8_t *buf, int len) in get_pad_len() argument
1097 static int get_lpt_node_type(const struct ubifs_info *c, uint8_t *buf, in get_lpt_node_type() argument
1100 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES; in get_lpt_node_type()
1116 static int is_a_node(const struct ubifs_info *c, uint8_t *buf, int len) in is_a_node() argument
1118 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES; in is_a_node()
1131 addr = buf; in is_a_node()
1133 calc_crc = crc16(-1, buf + UBIFS_LPT_CRC_BYTES, in is_a_node()
1155 void *buf = c->lpt_buf; in lpt_gc_lnum() local
1159 err = ubifs_leb_read(c, lnum, buf, 0, c->leb_size, 1); in lpt_gc_lnum()
1164 if (!is_a_node(c, buf, len)) { in lpt_gc_lnum()
1167 pad_len = get_pad_len(c, buf, len); in lpt_gc_lnum()
1169 buf += pad_len; in lpt_gc_lnum()
1175 node_type = get_lpt_node_type(c, buf, &node_num); in lpt_gc_lnum()
1184 buf += node_len; in lpt_gc_lnum()
1506 static int dbg_is_all_ff(uint8_t *buf, int len) in dbg_is_all_ff() argument
1511 if (buf[i] != 0xff) in dbg_is_all_ff()
1641 void *buf, *p; in dbg_check_ltab_lnum() local
1646 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL); in dbg_check_ltab_lnum()
1647 if (!buf) { in dbg_check_ltab_lnum()
1654 err = ubifs_leb_read(c, lnum, buf, 0, c->leb_size, 1); in dbg_check_ltab_lnum()
1698 vfree(buf); in dbg_check_ltab_lnum()
1892 void *buf, *p; in dump_lpt_leb() local
1895 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL); in dump_lpt_leb()
1896 if (!buf) { in dump_lpt_leb()
1901 err = ubifs_leb_read(c, lnum, buf, 0, c->leb_size, 1); in dump_lpt_leb()
1982 vfree(buf); in dump_lpt_leb()