[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] modulprogrammering



lars wrote:
> 
> For sjov skyld ville jeg lave et lille fortune modul til kernen( man kan
> vel ikke leve uden ).
> Jeg for problemer når jeg laver min struct file_operations. Folk på
> nettet siger, at det skulle
> løse problemet at sætte NULL, som det sidste argument, da den selv
> skulle kunne "fylde"
> de resterende elementer ud. Jeg prøver at compile på en 2.2-14 kerne.
> 
> Koden ser indtil videre sådan her ud:
> 
> //inkluder header filer
> #include <linux/kernel.h>
> #include <linux/module.h>
> //vi arbejder i filsystemet
> #include <linux/fs.h>
> 
> //vi arbejder med kernenn
> #ifndef __KERNEL__
> #define __KERNEL__
> #endif
> 
Jamen, __KERNEL__ skal da være defineret før fs.h inkluderes, ellers
bliver `struct file' jo ikke defineret - og det er netop hvad compileren
siger!
(Faktisk skal __KERNEL__ også være defineret før kernel.h inkluderes)
 
> fortune.c:26: warning: `struct file' declared inside parameter list
> fortune.c:26: warning: its scope is only this definition or declaration,
> 
> fortune.c:26: warning: which is probably not what you want.

> 
> Jeg håber nogle kan hjælpe mig
> 
> Med venlig hilsen
> 
> Lars Hansen

/Egon


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *