LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2012, 01:56 AM   #1
jideesha
LQ Newbie
 
Registered: Jul 2012
Posts: 7

Rep: Reputation: Disabled
error: ‘struct request’ has no member named ‘current_nr_sectors’


i have write a block device driver ramdisk program for compilation its getting the error in following code

llc_transfer(dev, req->sector, req->current_nr_sectors, req->buffer, rq_data_dir(req));

the error is
‘struct request’ has no member named ‘sector’

/home/jideesha/ram/ramdisk.c:97: error: ‘struct request’ has no member named ‘current_nr_sectors’
i am using the kernael version 2.6.32.33 generic
for this what is solution
 
Old 09-03-2012, 08:54 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,681

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by jideesha View Post
i have write a block device driver ramdisk program for compilation its getting the error in following code

llc_transfer(dev, req->sector, req->current_nr_sectors, req->buffer, rq_data_dir(req));

the error is
‘struct request’ has no member named ‘sector’

/home/jideesha/ram/ramdisk.c:97: error: ‘struct request’ has no member named ‘current_nr_sectors’
i am using the kernael version 2.6.32.33 generic
for this what is solution
No idea...this is YOUR code, that you wrote. You've given us one line, and a vague kernel (what distro is the kernel running on??)

Best suggestion: this is code that you wrote...no one knows it better than you. So logically, you are the best person to debug the code.
 
Old 09-05-2012, 12:12 AM   #3
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by jideesha View Post
the error is
‘struct request’ has no member named ‘sector’

/home/jideesha/ram/ramdisk.c:97: error: ‘struct request’ has no member named ‘current_nr_sectors’
i am using the kernael version 2.6.32.33 generic
It is there as per the documentation but it seems that the documentation is old!
Perhaps they have changed the API?
Did you look in the file blkdev.h w.r.t your kernel version?

For kernel 2.6.38.8, I couldn't find any member named `current_nr_sectors` in the
`struct request` declaration, in file blkdev.h.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error: â??struct sk_buffâ?? has no member named â??dstâ?? sunayanaiyer@gmail.com Linux - Newbie 2 05-29-2012 12:32 AM
[SOLVED] error: 'struct tty_struct' has no member named 'device' vlzj Programming 4 04-11-2012 07:58 PM
error: ‘struct in6_addr’ has no member named ‘in6_u’ deb1513 Programming 1 12-02-2008 06:56 AM
error: ‘struct tcphdr’ has no member named ‘th_flags’ nasim751 Linux - Software 0 04-17-2008 05:55 AM
error: ‘struct inode’ has no member named ‘u’ PankajDS Linux - Kernel 0 02-25-2008 11:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration