Lines Matching refs:buflen
687 static int ldm_relative(const u8 *buffer, int buflen, int base, int offset) in ldm_relative() argument
691 if (!buffer || offset < 0 || base > buflen) { in ldm_relative()
696 if (base > buflen) in ldm_relative()
697 ldm_error("base (%d) > buflen (%d)", base, buflen); in ldm_relative()
700 if (base + buffer[base] >= buflen) { in ldm_relative()
702 buffer[base], buflen); in ldm_relative()
758 static int ldm_get_vstr (const u8 *block, u8 *buffer, int buflen) in ldm_get_vstr() argument
765 if (length >= buflen) { in ldm_get_vstr()
766 ldm_error ("Truncating string %d -> %d.", length, buflen); in ldm_get_vstr()
767 length = buflen - 1; in ldm_get_vstr()
786 static bool ldm_parse_cmp3 (const u8 *buffer, int buflen, struct vblk *vb) in ldm_parse_cmp3() argument
793 r_objid = ldm_relative (buffer, buflen, 0x18, 0); in ldm_parse_cmp3()
794 r_name = ldm_relative (buffer, buflen, 0x18, r_objid); in ldm_parse_cmp3()
795 r_vstate = ldm_relative (buffer, buflen, 0x18, r_name); in ldm_parse_cmp3()
796 r_child = ldm_relative (buffer, buflen, 0x1D, r_vstate); in ldm_parse_cmp3()
797 r_parent = ldm_relative (buffer, buflen, 0x2D, r_child); in ldm_parse_cmp3()
800 r_stripe = ldm_relative (buffer, buflen, 0x2E, r_parent); in ldm_parse_cmp3()
801 r_cols = ldm_relative (buffer, buflen, 0x2E, r_stripe); in ldm_parse_cmp3()
837 static int ldm_parse_dgr3 (const u8 *buffer, int buflen, struct vblk *vb) in ldm_parse_dgr3() argument
844 r_objid = ldm_relative (buffer, buflen, 0x18, 0); in ldm_parse_dgr3()
845 r_name = ldm_relative (buffer, buflen, 0x18, r_objid); in ldm_parse_dgr3()
846 r_diskid = ldm_relative (buffer, buflen, 0x18, r_name); in ldm_parse_dgr3()
849 r_id1 = ldm_relative (buffer, buflen, 0x24, r_diskid); in ldm_parse_dgr3()
850 r_id2 = ldm_relative (buffer, buflen, 0x24, r_id1); in ldm_parse_dgr3()
881 static bool ldm_parse_dgr4 (const u8 *buffer, int buflen, struct vblk *vb) in ldm_parse_dgr4() argument
889 r_objid = ldm_relative (buffer, buflen, 0x18, 0); in ldm_parse_dgr4()
890 r_name = ldm_relative (buffer, buflen, 0x18, r_objid); in ldm_parse_dgr4()
893 r_id1 = ldm_relative (buffer, buflen, 0x44, r_name); in ldm_parse_dgr4()
894 r_id2 = ldm_relative (buffer, buflen, 0x44, r_id1); in ldm_parse_dgr4()
925 static bool ldm_parse_dsk3 (const u8 *buffer, int buflen, struct vblk *vb) in ldm_parse_dsk3() argument
932 r_objid = ldm_relative (buffer, buflen, 0x18, 0); in ldm_parse_dsk3()
933 r_name = ldm_relative (buffer, buflen, 0x18, r_objid); in ldm_parse_dsk3()
934 r_diskid = ldm_relative (buffer, buflen, 0x18, r_name); in ldm_parse_dsk3()
935 r_altname = ldm_relative (buffer, buflen, 0x18, r_diskid); in ldm_parse_dsk3()
964 static bool ldm_parse_dsk4 (const u8 *buffer, int buflen, struct vblk *vb) in ldm_parse_dsk4() argument
971 r_objid = ldm_relative (buffer, buflen, 0x18, 0); in ldm_parse_dsk4()
972 r_name = ldm_relative (buffer, buflen, 0x18, r_objid); in ldm_parse_dsk4()
997 static bool ldm_parse_prt3(const u8 *buffer, int buflen, struct vblk *vb) in ldm_parse_prt3() argument
1003 r_objid = ldm_relative(buffer, buflen, 0x18, 0); in ldm_parse_prt3()
1008 r_name = ldm_relative(buffer, buflen, 0x18, r_objid); in ldm_parse_prt3()
1013 r_size = ldm_relative(buffer, buflen, 0x34, r_name); in ldm_parse_prt3()
1018 r_parent = ldm_relative(buffer, buflen, 0x34, r_size); in ldm_parse_prt3()
1023 r_diskid = ldm_relative(buffer, buflen, 0x34, r_parent); in ldm_parse_prt3()
1029 r_index = ldm_relative(buffer, buflen, 0x34, r_diskid); in ldm_parse_prt3()
1073 static bool ldm_parse_vol5(const u8 *buffer, int buflen, struct vblk *vb) in ldm_parse_vol5() argument
1080 r_objid = ldm_relative(buffer, buflen, 0x18, 0); in ldm_parse_vol5()
1085 r_name = ldm_relative(buffer, buflen, 0x18, r_objid); in ldm_parse_vol5()
1090 r_vtype = ldm_relative(buffer, buflen, 0x18, r_name); in ldm_parse_vol5()
1095 r_disable_drive_letter = ldm_relative(buffer, buflen, 0x18, r_vtype); in ldm_parse_vol5()
1101 r_child = ldm_relative(buffer, buflen, 0x2D, r_disable_drive_letter); in ldm_parse_vol5()
1106 r_size = ldm_relative(buffer, buflen, 0x3D, r_child); in ldm_parse_vol5()
1112 r_id1 = ldm_relative(buffer, buflen, 0x52, r_size); in ldm_parse_vol5()
1120 r_id2 = ldm_relative(buffer, buflen, 0x52, r_id1); in ldm_parse_vol5()
1128 r_size2 = ldm_relative(buffer, buflen, 0x52, r_id2); in ldm_parse_vol5()
1136 r_drive = ldm_relative(buffer, buflen, 0x52, r_size2); in ldm_parse_vol5()