[lvm-devel] Re: [PATCH 2/6] Add devices/data_alignment_offset_detection to lvm.conf.
Milan Broz
mbroz at redhat.com
Fri Jul 17 07:43:56 UTC 2009
Mike Snitzer wrote:
> On Thu, Jul 16 2009 at 2:47pm -0400,
> Milan Broz <mbroz at redhat.com> wrote:
> I'll be sure to cast all MAJOR() and MINOR() calls when used with
> dm_snprintf(). Would still like to understand how not using a cast gets
> us into trouble... but that is for when I get back from vacation ;)
That's clear, we have compatibility macros for MAJOR defined,
on linux it is defined:
# define MAJOR(dev) ((dev & 0xfff00) >> 8)
printf %d expect on 32bit int (4 bytes) but MAJOR(dev) is long (8 bytes) here.
On x86_64 it is the same size, so it works.
Just use retype here...
Milan
More information about the lvm-devel
mailing list