lkml.org 
[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel OOPS[filesystem programming]
What is *my_inode set to?

Jeba Anandhan A wrote:

>i have written kernel program to access the data
>structure of particular inode.
>
>#include<linux/kernel.h>
>#include<linux/module.h>
>#include<linux/fs.h>
>
>static struct inode *my_inode;
>static unsigned long inode_no;
>
>
>int init_module(void){
> printk("inode module inserted\n");
> inode_no=1304012;
> printk("inode no=%d",inode_no);
> my_inode->i_ino=inode_no; // it creates segmentation
> //fault why so..
>return 0;
>}
>
>void cleanup_module(void){
>}
>
begin:vcard
fn:David Ford
n:Ford;David
email;internet:david@blue-labs.org
title:Industrial Geek
tel;home:Ask please
tel;cell:(203) 650-3611
x-mozilla-html:TRUE
version:2.1
end:vcard

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.038 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site