LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 08-17-2009, 11:59 AM   #1
davidho3
LQ Newbie
 
Registered: Jul 2004
Location: U.S
Posts: 8
Thanked: 0
SD card format or init


[Log in to get rid of this advertisement]
I am trying to format my SD card (linux system) by programming. Does anyone has the source code to init/Format SD card

Thanks
davidho3 is offline  
Tag This Post ,
Reply With Quote
Old 08-18-2009, 04:45 PM   #2
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,905
Thanked: 267
"Formatting" is done by writing a new file system.
Could be : 'mkdosfs' or 'mkfs.ext2'.

Get a list with : 'ls -l /sbin/mk*

Example command : # mkfs.vfat /dev/sdc1

Information about the commands, e.g. : 'man mkdosfs'
And the source code, if you wish, download it,
.. then you can read the code.
.....
knudfl is offline     Reply With Quote
Old 08-18-2009, 09:16 PM   #3
davidho3
LQ Newbie
 
Registered: Jul 2004
Location: U.S
Posts: 8
Thanked: 0

Original Poster
How can I put 'mkfs.ext2' ot 'mkdosfs" (Linux) into C code?

Thanks
davidho3 is offline     Reply With Quote
Old 08-21-2009, 08:39 AM   #4
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,905
Thanked: 267
I'm not a coder, but may be have a look at

http://www.google.com/search?hl=en&s...earch&aq=f&oq=
... and the the 2 first hits
1) http://www.thinkage.ca/english/gcos/...ib/system.html
2) http://www.unix.com/high-level-progr...command-c.html
.....
And / or
http://www.google.com/linux?hl=en&q=...nd&btnG=Search
http://www.google.com/linux
.....
linux knudfl is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
System hang on network card init av2zeal Linux - Networking 3 07-22-2008 01:48 PM
Broadcom card and init commands ogee Linux - Newbie 2 05-22-2008 03:22 PM
SIM card format phantom_cyph General 5 11-01-2007 10:14 PM
SD Card format problem drj000 Linux - Hardware 0 03-21-2005 12:02 AM
Slow ethernet card init... bfloeagle Linux - Newbie 9 10-12-2004 08:42 PM


All times are GMT -5. The time now is 03:36 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration