}
blob_init(attr, id, payload + sizeof(struct blob_attr));
+ blob_fill_pad(attr);
return attr;
}
buf->buflen = 0;
}
-static void
+void
blob_fill_pad(struct blob_attr *attr)
{
char *buf = (char *) attr;
len &= BLOB_ATTR_LEN_MASK;
len |= (id << BLOB_ATTR_ID_SHIFT) & BLOB_ATTR_ID_MASK;
attr->id_len = cpu_to_be32(len);
- blob_fill_pad(attr);
}
struct blob_attr *
return (struct blob_attr *) ((char *) attr + blob_pad_len(attr));
}
+extern void blob_fill_pad(struct blob_attr *attr);
extern void blob_set_raw_len(struct blob_attr *attr, unsigned int len);
extern bool blob_attr_equal(const struct blob_attr *a1, const struct blob_attr *a2);
extern int blob_buf_init(struct blob_buf *buf, int id);
attrlen = blob_raw_len(attr) + len;
blob_set_raw_len(attr, attrlen);
+ blob_fill_pad(attr);
+
blob_set_raw_len(buf->head, blob_raw_len(buf->head) + blob_pad_len(attr));
}