views:

19

answers:

1

I have to make a ioctl call to the 64 bit driver code from a 32 bit application. I have send a structure as an argument to ioctl call. I see lot of alignment and padding issues because of difference in architecture of user and driver code. Is there any way to solve this structure and padding created due to difference in architecture of user and driver code?

A: 

check your compiler for a 'pack' switch - it might be referred to as alignment or padding. In the case of a device driver, the data must be sent/recv'd exactly as expected.

KevinDTimm
wat about difference in sizes of variable types in user and kernel space?
suresh