[Prev][Next][Index][Thread]

Linux FS and fopen



Hi,

I have 2 problems that may be related:

Firstly, I can mount a drive, and read and write using oskits seek, read
and write functions, but I really would like to use the linux filesystem
using fopen, fprintf and fclose etc.

I've read through all the archives, and tried various attempts of ideas
there, but I am gathering I'm totally confused, or just missing
something very simple.

All I am asking is for some code that mounts a partition, and then uses
fopen, writes 'hello' into the file and closes the file.  It shouldn't
be much code from what I understand.

Secondly, when I 'make' the programs, I just use the standard 'make'. 
Such as, when compiling the example gethostbyname I use 'make
gethostbyname'.  It compiles and runs from grub, but, it can not access
the files on /etc/resolve.conf and hense, can't access the nameserver
variables.  

Should I use 'mklinuximage' or is there something else that is wrong
here?  Am I compiling it wrong?  Or is this normal for this unedited
example accessing data off a linux partition without it the partition
being mounted first?

Thanks in advance,

Vaughan Knight

Follow-Ups: