error: variable ‘scull_fops’ has initializer but incomplete type
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
unsigned long result;
printk("Can't get Major number %d\n",MAJ_NUM);
test=(unsigned long *)kmalloc(1024*5,"GFP_KERNEL");
printk("Cleanup Over \n");
new.c:7:23: error: linux/slab.h: No such file or directory
new.c:18: warning: ‘struct file’ declared inside parameter list
new.c:18: warning: its scope is only this definition or declaration, which is probably not what you want
new.c:18: warning: ‘struct inode’ declared inside parameter list
new.c:25: warning: ‘struct file’ declared inside parameter list
new.c:25: warning: ‘struct inode’ declared inside parameter list
new.c:34: error: variable ‘scull_fops’ has initializer but incomplete type
new.c:35: error: unknown field ‘open’ specified in initializer
new.c:35: warning: excess elements in struct initializer
new.c:35: warning: (near initialization for ‘scull_fops’)
new.c:36: error: unknown field ‘release’ specified in initializer
new.c:36: warning: excess elements in struct initializer
new.c:36: warning: (near initialization for ‘scull_fops’)
new.c: In function ‘init_module’:
new.c:50: error: invalid lvalue in assignment