LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-09-2009, 08:56 AM   #1
sunnyboy
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Rep: Reputation: 0
raw device


I have a USB device /dev/sda1.I use raw to bound it to /dev/raw/raw1.I can use fread to read from it,but I cannot use fwrite to write to it.
If i use system call read or write,it gives me the message:invalid argument.Why?
Thank you very much!
 
Old 07-10-2009, 08:14 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Raw I/O is deprecated - why are you not using O_DIRECT ?.
As for your problem, maybe your blksize isn't a multiple of sector size as the manpage suggests for dd usage. Using deprecated interfaces you are largely "on your own".
 
  


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
How to create raw device winoiknow Linux - General 1 02-02-2009 12:32 AM
what is a raw device? saintkay Linux - Desktop 2 09-17-2007 11:13 AM
what is raw device? DataSheet Linux - Newbie 19 01-08-2007 03:13 PM
Cannot open master raw device MDColson Mandriva 1 12-31-2004 01:55 PM
block device raw access rvilarl Programming 0 10-24-2004 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:38 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