--- Begin Message ---
On Tue, Dec 03, 2002 at 11:52:03AM -0800, Jose Luis Alarcon wrote:
> Hi all.
>
> I am trying compile a module that contains this line:
>
> printk("Device: %d.%d\n", inode->i_rdev >> 8, inode->i_rdev & 0xFF);
>
> and the result is that gcc 3.2.1 says that '>>' and '&' are wrong operators for
> the binary. Why?
My guess:
i_rdev in inode structure is of type kdev_t, which is defined in
include/linux/kdev_t.h and contains one member - unsigned short value. Maybe
try shifting/bitwise anding not on the structure, but on that particular member
of the structure.
Then if inode is a pointer to the inode struct, then it would be something
like:
printk("Device: %d.%d\n", (inode->i_rdev).value >> 8, (inode->i_rdev) & 0xff);
This guess obviously may occur wrong. Please tell, if it worked.
--
tadeusz a. kadlubowski
--- End Message ---