X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Ftypes%2Ffloat.c;h=7a7c323afc674bf689596b95a28fd5f7a76a01ad;hp=b2433bd8cb719c384e104e0f23d2e08d60bc355d;hb=aee35fcc7e82d20396d82d151de93b1b51325398;hpb=c4f467dac9d45cd7c0fe59654111612eb61332d9 diff --git a/formats/ctf/types/float.c b/formats/ctf/types/float.c index b2433bd8..7a7c323a 100644 --- a/formats/ctf/types/float.c +++ b/formats/ctf/types/float.c @@ -145,6 +145,7 @@ int ctf_float_read(struct stream_pos *ppos, struct definition *definition) struct definition *tmpdef; struct definition_float *tmpfloat; struct ctf_stream_pos destp; + struct mmap_align mma; int ret; switch (float_declaration->mantissa->len + 1) { @@ -163,7 +164,8 @@ int ctf_float_read(struct stream_pos *ppos, struct definition *definition) } tmpfloat = container_of(tmpdef, struct definition_float, p); ctf_init_pos(&destp, -1, O_RDWR); - destp.base = (char *) u.bits; + mmap_align_set_addr(&mma, (char *) u.bits); + destp.base_mma = &mma; destp.packet_size = sizeof(u) * CHAR_BIT; ctf_align_pos(pos, float_declaration->p.alignment); ret = _ctf_float_copy(&destp.parent, tmpfloat, ppos, float_definition); @@ -192,6 +194,7 @@ int ctf_float_write(struct stream_pos *ppos, struct definition *definition) struct definition *tmpdef; struct definition_float *tmpfloat; struct ctf_stream_pos srcp; + struct mmap_align mma; int ret; switch (float_declaration->mantissa->len + 1) { @@ -210,7 +213,8 @@ int ctf_float_write(struct stream_pos *ppos, struct definition *definition) } tmpfloat = container_of(tmpdef, struct definition_float, p); ctf_init_pos(&srcp, -1, O_RDONLY); - srcp.base = (char *) u.bits; + mmap_align_set_addr(&mma, (char *) u.bits); + srcp.base_mma = &mma; srcp.packet_size = sizeof(u) * CHAR_BIT; switch (float_declaration->mantissa->len + 1) { case FLT_MANT_DIG: