- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/unsure.gif
I doownloaded the linux kernel and filesystem into my altera stratix board. There i was able to create a e2fs filesystem in the compact flash using commands through the serial port. What i wanted to know is if i want to call these prebuitl binary functions like "fdisk", "mke2fs",etc from my application directly(i.e.as function calls) how do i do it? Is it possible.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might like to look into the "system" function, and "exec" and friends. However, if you find that your application mostly just runs other programs you could probably replace it with a shell script (or maybe even perl script: does perl run on these systems yet?). Excerpt from the system manpage:
<div class='quotetop'>QUOTE </div> --- Quote Start --- synopsis # include <stdlib.h> int system(const char *string); description system() executes a command specified in string by calling /bin/sh -c string, and returns after the command has been completed. During execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored.[/b] --- Quote End --- HTH.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page