RE: Adding to struct file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Within your kernel module you can store a value inside file->private_data
pointer. 

Konstantyn

-----Original Message-----
From: kernelnewbies-bounce@xxxxxxxxxxxx
[mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Can Sar
Sent: Tuesday, January 11, 2005 2:02 AM
To: kernelnewbies@xxxxxxxxxxxx
Subject: Adding to struct file

Hi,

I need to keep some information (just a number) for every open file in 
the system and thought that this could be most easily done by adding an 
integer field to the end of struct file. However, when doing this, I 
get all kinds of weird bugs with modules and then the kernel dies. Any 
suggestions to why this could be happening? I've had this problem in 
the past when adding things to structs, and I always add it to the end.
I would be glad about anything you could think of.

Thanks,
Can


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@xxxxxxxxxxxx - and destroy all copies of this information without reading or disclosing them.

Thank you.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux