LinuxQuestions.org
Visit Jeremy's Blog.
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 08-17-2009, 10:59 AM   #1
davidho3
LQ Newbie
 
Registered: Jul 2004
Location: U.S
Posts: 8

Rep: Reputation: 0
SD card format or init


I am trying to format my SD card (linux system) by programming. Does anyone has the source code to init/Format SD card

Thanks
 
Old 08-18-2009, 03:45 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,947

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
"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.
.....
 
Old 08-18-2009, 08:16 PM   #3
davidho3
LQ Newbie
 
Registered: Jul 2004
Location: U.S
Posts: 8

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

Thanks
 
Old 08-21-2009, 07:39 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,947

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
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
.....
 
  


Reply

Tags
init, sd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 09:49 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration