> I just looked at <linux/genhd.h> (2.0.36) and it has
> __attributte((packed)) which I think is the right way to spell it in
> unadorned c.  The partition struct was invented for the 8 bit pc, which
> had no notion of word alignment, so that is trying to tell the compiler
> not to insert slack bytes to make the words line up.  Since it is 8
> unsigned char followed by 2 unsigned int, it does line up, but if you
> look at a partition record you will see that the struct is misaligned
> within the record.  

> Where did you get your kernel headers? :-)

<G -- shaking head> from my Deliriou5 imagination.  I suppose I've modified
(all) mine in an attempt to get my normal source to compile.  As I unpack
the latest tarball, I also find that it contains __attribute__((packed)). 
However, it still baffles me why my code won't compile unless I delete it. 
With 2.7.2.3 it was giving me parse errors, I'll buy that if it's because
this was added in 2.8.  It still doesn't make sense to me that 2.8.1 is
giving me "multiply defined symbol": packed.  It really is defined in all
the object files it claims.  That doesn't seem like something that needs
defined as a symbol, but rather an operation the compiler should take.  Am
I wrong and confused? -- perhaps you could answer the former part of that
question, I'm well aware of the answer to the latter <G>

I really don't have a problem deleting it, it doesn't change anything in my
program (since I don't mess with the kernel instances of partition).  I'm
just wondering why it's doing such weird things.

Thanx again
geisel


Reply via email to