public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* USB Device Access
@ 2004-10-19 11:23 Jeba Anandhan A
  2004-10-19 14:03 ` Jan-Benedict Glaw
  0 siblings, 1 reply; 2+ messages in thread
From: Jeba Anandhan A @ 2004-10-19 11:23 UTC (permalink / raw)
  To: linux-kernel

Hi,
i have one USB Flash Disk.when i attached to it,linux
2.4.20-8 detected it as /dev/sda1.my question,i wish
to write some raw data and read raw data.it consist
fat filesystem.how to do it.[shall i need to mount the
device in some directory].
expecting reply
urgent please


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: USB Device Access
  2004-10-19 11:23 USB Device Access Jeba Anandhan A
@ 2004-10-19 14:03 ` Jan-Benedict Glaw
  0 siblings, 0 replies; 2+ messages in thread
From: Jan-Benedict Glaw @ 2004-10-19 14:03 UTC (permalink / raw)
  To: Jeba Anandhan A; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]

On Tue, 2004-10-19 04:23:46 -0700, Jeba Anandhan A <jeba_career@yahoo.com>
wrote in message <20041019112347.93552.qmail@web50608.mail.yahoo.com>:
> i have one USB Flash Disk.when i attached to it,linux
> 2.4.20-8 detected it as /dev/sda1.my question,i wish

No, it doesn't. It will detect it as /dev/sda and additionally create a
partition (/dev/sda1) for it).

> to write some raw data and read raw data.it consist
> fat filesystem.how to do it.[shall i need to mount the
> device in some directory].

Well, it depends on what you actually want:

- Raw data in a file inside a partition:
	Mount the filesystem of the partition somewhere and open() the file

- Raw data inside the partition:
	open() the partition (/dev/sda1 in your case); this'll probably
	destroy the filesystem that it contains.

- Raw data directly on the (unpartitioned) device:
	open() the device (/dev/sda) and write to it. That will probably
	kill the partition table as well as the filesystem in this
	partition.
  
By the way, this isn't really a kernel question, and if it's "urgent",
you'd probably ask your boss to send us some $$ for helping you...

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-19 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-19 11:23 USB Device Access Jeba Anandhan A
2004-10-19 14:03 ` Jan-Benedict Glaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox