Byron Clark wrote:
On 06/05/11 at 04:41am, hatem gamal elzanaty wrote:
i have a problem to add a file to /proc does there is a simple way or even a how to program syntax to do so the system reject to enter the file i need to enter into the /proc file can any one tell me how to do it or direct me to a how to a free method that is simple and accurate

Creating a file in /proc is going to require a kernel module or a
patched kernel. Chapter four[1] of _Linux Device Drivers_[2] describes
how to create a file in /proc.

That said, it's no longer considered good form to add anything to /proc.
The new home for this information is the /sys filesystem or debugfs.
LWN has a quick guide for using debugfs[3].

[1] https://lwn.net/images/pdf/LDD3/ch04.pdf
[2] https://lwn.net/Kernel/LDD3/
[3] https://lwn.net/Articles/334546/

thanks for your reply but i have no straight forward how to in steps or in how to compile or run that is why i'm warring of carshing the system
in the link below
http://tldp.org/LDP/lkmpg/2.6/html/x769.html
i get those errors and i don't konw what is the cause  here is how i compile
====================================================
export srcf="/data/hatem/work/c/project/learning/source/010"
export objf="/data/hatem/work/c/project/learning/object/010"
cd $srcf
gcc   -g  -o  proc.bin proc.c
mv -f ./proc.bin  $objf
cd $objf
./proc.bin

am i suppose to change the header files for that to work can you help in that thanks in advance
the error message is attached


In file included from /usr/include/linux/spinlock.h:56,
                 from /usr/include/linux/module.h:10,
                 from proc.c:4:
/usr/include/asm/system.h:306: error: expected declaration specifiers or 
‘...’ before ‘u8’
/usr/include/asm/system.h:306: error: expected declaration specifiers or 
‘...’ before ‘u8’
/usr/include/asm/system.h:307: error: expected declaration specifiers or 
‘...’ before ‘u16’
/usr/include/asm/system.h:307: error: expected declaration specifiers or 
‘...’ before ‘u16’
/usr/include/asm/system.h:308: error: expected declaration specifiers or 
‘...’ before ‘u32’
/usr/include/asm/system.h:308: error: expected declaration specifiers or 
‘...’ before ‘u32’
/usr/include/asm/system.h: In function ‘cmpxchg_386’:
/usr/include/asm/system.h:315: error: too many arguments to function 
‘cmpxchg_386_u8’
/usr/include/asm/system.h:317: error: too many arguments to function 
‘cmpxchg_386_u16’
/usr/include/asm/system.h:319: error: too many arguments to function 
‘cmpxchg_386_u32’
In file included from /usr/include/linux/lockdep.h:13,
                 from /usr/include/linux/spinlock_types.h:18,
                 from /usr/include/linux/spinlock.h:78,
                 from /usr/include/linux/module.h:10,
                 from proc.c:4:
/usr/include/linux/list.h:1003:2: warning: #warning "don't include kernel 
headers in userspace"
In file included from /usr/include/linux/cpumask.h:86,
                 from /usr/include/asm/processor.h:22,
                 from /usr/include/asm/atomic.h:5,
                 from /usr/include/linux/spinlock.h:259,
                 from /usr/include/linux/module.h:10,
                 from proc.c:4:
/usr/include/linux/bitmap.h: In function ‘bitmap_zero’:
/usr/include/linux/bitmap.h:131: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h:131: error: (Each undeclared identifier is reported 
only once
/usr/include/linux/bitmap.h:131: error: for each function it appears in.)
/usr/include/linux/bitmap.h: In function ‘bitmap_fill’:
/usr/include/linux/bitmap.h:146: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: In function ‘bitmap_copy’:
/usr/include/linux/bitmap.h:152: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: In function ‘bitmap_and’:
/usr/include/linux/bitmap.h:163: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: In function ‘bitmap_or’:
/usr/include/linux/bitmap.h:172: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: In function ‘bitmap_xor’:
/usr/include/linux/bitmap.h:181: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: In function ‘bitmap_andnot’:
/usr/include/linux/bitmap.h:190: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: In function ‘bitmap_complement’:
/usr/include/linux/bitmap.h:199: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: At top level:
/usr/include/linux/bitmap.h:205: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘bitmap_equal’
/usr/include/linux/bitmap.h:214: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘bitmap_intersects’
/usr/include/linux/bitmap.h:223: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘bitmap_subset’
/usr/include/linux/bitmap.h:232: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘bitmap_empty’
/usr/include/linux/bitmap.h:240: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘bitmap_full’
/usr/include/linux/bitmap.h:248: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘bitmap_weight’
/usr/include/linux/bitmap.h: In function ‘bitmap_shift_right’:
/usr/include/linux/bitmap.h:258: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
/usr/include/linux/bitmap.h: In function ‘bitmap_shift_left’:
/usr/include/linux/bitmap.h:267: error: ‘BITS_PER_LONG’ undeclared (first 
use in this function)
In file included from /usr/include/asm/processor.h:22,
                 from /usr/include/asm/atomic.h:5,
                 from /usr/include/linux/spinlock.h:259,
                 from /usr/include/linux/module.h:10,
                 from proc.c:4:
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:88: error: expected specifier-qualifier-list 
before ‘DECLARE_BITMAP’
/usr/include/linux/cpumask.h: In function ‘__cpu_set’:
/usr/include/linux/cpumask.h:94: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpu_clear’:
/usr/include/linux/cpumask.h:100: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_setall’:
/usr/include/linux/cpumask.h:106: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_clear’:
/usr/include/linux/cpumask.h:112: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpu_test_and_set’:
/usr/include/linux/cpumask.h:121: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_and’:
/usr/include/linux/cpumask.h:128: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:128: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:128: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_or’:
/usr/include/linux/cpumask.h:135: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:135: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:135: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_xor’:
/usr/include/linux/cpumask.h:142: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:142: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:142: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_andnot’:
/usr/include/linux/cpumask.h:150: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:150: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:150: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_complement’:
/usr/include/linux/cpumask.h:157: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:157: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_equal’:
/usr/include/linux/cpumask.h:164: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:164: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_intersects’:
/usr/include/linux/cpumask.h:171: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:171: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_subset’:
/usr/include/linux/cpumask.h:178: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:178: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_empty’:
/usr/include/linux/cpumask.h:184: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_full’:
/usr/include/linux/cpumask.h:190: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_weight’:
/usr/include/linux/cpumask.h:196: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_shift_right’:
/usr/include/linux/cpumask.h:204: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:204: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_shift_left’:
/usr/include/linux/cpumask.h:212: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:212: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpumask_scnprintf’:
/usr/include/linux/cpumask.h:273: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpumask_parse’:
/usr/include/linux/cpumask.h:281: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpulist_scnprintf’:
/usr/include/linux/cpumask.h:289: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpulist_parse’:
/usr/include/linux/cpumask.h:295: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpu_remap’:
/usr/include/linux/cpumask.h:303: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:303: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h: In function ‘__cpus_remap’:
/usr/include/linux/cpumask.h:311: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:311: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:311: error: ‘cpumask_t’ has no member named 
‘bits’
/usr/include/linux/cpumask.h:311: error: ‘cpumask_t’ has no member named 
‘bits’
In file included from /usr/include/asm/atomic.h:5,
                 from /usr/include/linux/spinlock.h:259,
                 from /usr/include/linux/module.h:10,
                 from proc.c:4:
/usr/include/asm/processor.h: At top level:
/usr/include/asm/processor.h:80: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ 
undeclared here (not in a function)
/usr/include/asm/processor.h:80: error: requested alignment is not a constant
In file included from /usr/include/linux/module.h:21,
                 from proc.c:4:
/usr/include/linux/marker.h:33: error: expected declaration specifiers or 
‘...’ before ‘va_list’
In file included from /usr/include/asm/local.h:4,
                 from /usr/include/linux/module.h:22,
                 from proc.c:4:
/usr/include/linux/percpu.h: In function ‘__alloc_percpu’:
/usr/include/linux/percpu.h:51: error: ‘GFP_KERNEL’ undeclared (first use 
in this function)
In file included from /usr/include/linux/module.h:24,
                 from proc.c:4:
/usr/include/asm/module.h:65:2: error: #error unknown processor family
In file included from proc.c:4:
/usr/include/linux/module.h: At top level:
/usr/include/linux/module.h:51: error: field ‘attr’ has incomplete type
/usr/include/linux/module.h:62: error: field ‘kobj’ has incomplete type
In file included from proc.c:6:
/usr/include/linux/proc_fs.h:79: error: field ‘list’ has incomplete type
/usr/include/linux/proc_fs.h:264: error: field ‘vfs_inode’ has incomplete 
type
/usr/include/linux/proc_fs.h: In function ‘PROC_I’:
/usr/include/linux/proc_fs.h:269: error: expected expression before ‘struct’
In file included from /usr/include/linux/uaccess.h:5,
                 from proc.c:7:
/usr/include/asm/uaccess.h: At top level:
/usr/include/asm/uaccess.h:389: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__copy_to_user_ll’
/usr/include/asm/uaccess.h:391: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__copy_from_user_ll’
/usr/include/asm/uaccess.h:393: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__copy_from_user_ll_nozero’
/usr/include/asm/uaccess.h:395: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__copy_from_user_ll_nocache’
/usr/include/asm/uaccess.h:397: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__copy_from_user_ll_nocache_nozero’
/usr/include/asm/uaccess.h:422: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__copy_to_user_inatomic’
/usr/include/asm/uaccess.h:443: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__copy_to_user’
/usr/include/asm/uaccess.h: In function ‘__copy_from_user_inatomic’:
/usr/include/asm/uaccess.h:484: error: ‘u8’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:484: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:484: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:484: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:484: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:484: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:484: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:484: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:487: error: ‘u16’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:487: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:487: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:487: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:487: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:487: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:487: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:487: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:490: error: ‘u32’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:490: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:490: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:490: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:490: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:490: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:490: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:490: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:484: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:484: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:484: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:487: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:487: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:487: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:490: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:490: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:490: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h: In function ‘__copy_from_user’:
/usr/include/asm/uaccess.h:505: error: ‘u8’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:505: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:505: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:505: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:505: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:505: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:505: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:505: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:508: error: ‘u16’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:508: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:508: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:508: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:508: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:508: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:508: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:508: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:511: error: ‘u32’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:511: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:511: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:511: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:511: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:511: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:511: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:511: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:505: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:505: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:505: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:508: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:508: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:508: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:511: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:511: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:511: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h: In function ‘__copy_from_user_nocache’:
/usr/include/asm/uaccess.h:529: error: ‘u8’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:529: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:529: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:529: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:529: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:529: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:529: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:529: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:532: error: ‘u16’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:532: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:532: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:532: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:532: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:532: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:532: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:532: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:535: error: ‘u32’ undeclared (first use in this 
function)
/usr/include/asm/uaccess.h:535: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:535: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:535: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:535: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:535: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:535: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:535: error: expected expression before ‘)’ token
/usr/include/asm/uaccess.h:529: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:529: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:529: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:532: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:532: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:532: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:535: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:535: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h:535: error: matching constraint references invalid 
operand number
/usr/include/asm/uaccess.h: At top level:
/usr/include/asm/uaccess.h:548: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘copy_to_user’
/usr/include/asm/uaccess.h:550: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘copy_from_user’
/usr/include/asm/uaccess.h:552: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘strncpy_from_user’
/usr/include/asm/uaccess.h:554: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__strncpy_from_user’
/usr/include/asm/uaccess.h:574: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘clear_user’
/usr/include/asm/uaccess.h:575: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘__clear_user’
In file included from proc.c:7:
/usr/include/linux/uaccess.h: In function ‘pagefault_disable’:
/usr/include/linux/uaccess.h:18: error: invalid type argument of ‘->’
/usr/include/linux/uaccess.h: In function ‘pagefault_enable’:
/usr/include/linux/uaccess.h:33: error: invalid type argument of ‘->’
proc.c: In function ‘procfile_read’:
proc.c:46: error: ‘KERN_INFO’ undeclared (first use in this function)
proc.c:46: error: expected ‘)’ before string constant
proc.c:53: warning: incompatible implicit declaration of built-in function 
‘memcpy’
proc.c: In function ‘init_module’:
proc.c:92: error: ‘KERN_ALERT’ undeclared (first use in this function)
proc.c:92: error: expected ‘)’ before string constant
proc.c:100: error: ‘S_IFREG’ undeclared (first use in this function)
proc.c:100: error: ‘S_IRUGO’ undeclared (first use in this function)
proc.c:105: error: ‘KERN_INFO’ undeclared (first use in this function)
proc.c:105: error: expected ‘)’ before string constant
proc.c: In function ‘cleanup_module’:
proc.c:116: error: ‘KERN_INFO’ undeclared (first use in this function)
proc.c:116: error: expected ‘)’ before string constant
mv: cannot stat `./proc.bin': No such file or directory
c010: line 17: ./proc.bin: No such file or directory




/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to