* [ECOS] Filesystem get/setinfo
@ 2003-10-20 12:41 Savin Zlobec
2003-10-20 17:07 ` Nick Garnett
0 siblings, 1 reply; 4+ messages in thread
From: Savin Zlobec @ 2003-10-20 12:41 UTC (permalink / raw)
To: ecos-discuss
I need to write some filesystem specific functions.
The get/setinfo calls seem to be the right way to do this,
but I can't find any functions to access them from my application.
The following functions would do the trick for me:
int cyg_fs_getinfo(const char *path, int key, void *buf, int len);
int cyg_fs_setinfo(const char *path, int key, void *buf, int len);
int cyg_fs_fgetinfo(int fd, int key, void *buf, int len);
int cyg_fs_fsetinfo(int fd, int key, void *buf. int len);
Or is there any way to do this already without accessing internal
structures?
savin
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] Filesystem get/setinfo
2003-10-20 12:41 [ECOS] Filesystem get/setinfo Savin Zlobec
@ 2003-10-20 17:07 ` Nick Garnett
2003-10-20 18:25 ` Savin Zlobec
0 siblings, 1 reply; 4+ messages in thread
From: Nick Garnett @ 2003-10-20 17:07 UTC (permalink / raw)
To: Savin Zlobec; +Cc: ecos-discuss
Savin Zlobec <savin@elatec.si> writes:
> I need to write some filesystem specific functions.
> The get/setinfo calls seem to be the right way to do this,
> but I can't find any functions to access them from my application.
>
> The following functions would do the trick for me:
>
> int cyg_fs_getinfo(const char *path, int key, void *buf, int len);
> int cyg_fs_setinfo(const char *path, int key, void *buf, int len);
> int cyg_fs_fgetinfo(int fd, int key, void *buf, int len);
> int cyg_fs_fsetinfo(int fd, int key, void *buf. int len);
>
> Or is there any way to do this already without accessing internal
> structures?
For filesystems you should be using ioctl() for these sorts of
out-of-band control operations. That's what it's there for, and more
than likely there is already a code defined for what you want to do.
What do you need these functions for?
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] Filesystem get/setinfo
2003-10-20 17:07 ` Nick Garnett
@ 2003-10-20 18:25 ` Savin Zlobec
2003-10-22 9:32 ` Nick Garnett
0 siblings, 1 reply; 4+ messages in thread
From: Savin Zlobec @ 2003-10-20 18:25 UTC (permalink / raw)
To: Nick Garnett; +Cc: ecos-discuss
On Mon, 20 Oct 2003 at 19:07:19, Nick Garnett wrote:
> Savin Zlobec <savin@elatec.si> writes:
>
> > I need to write some filesystem specific functions.
> > The get/setinfo calls seem to be the right way to do this,
> > but I can't find any functions to access them from my application.
> >
> > The following functions would do the trick for me:
> >
> > int cyg_fs_getinfo(const char *path, int key, void *buf, int len);
> > int cyg_fs_setinfo(const char *path, int key, void *buf, int len);
> > int cyg_fs_fgetinfo(int fd, int key, void *buf, int len);
> > int cyg_fs_fsetinfo(int fd, int key, void *buf. int len);
> >
> > Or is there any way to do this already without accessing internal
> > structures?
>
> For filesystems you should be using ioctl() for these sorts of
> out-of-band control operations. That's what it's there for, and more
> than likely there is already a code defined for what you want to do.
I could work with ioctl, but if the desired operation is filesystem
oriented (as opposed to file oriented), then I would need to open a
file just to get a file descriptor for use with ioctl.
> What do you need these functions for?
Currently I need fs info like total/free/used sectors count,
status flags (if it was cleanly unmounted and if there were any IO errors).
Later I may need some sort of special access to reserved sectors...
savin
____________________
http://www.email.si/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] Filesystem get/setinfo
2003-10-20 18:25 ` Savin Zlobec
@ 2003-10-22 9:32 ` Nick Garnett
0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2003-10-22 9:32 UTC (permalink / raw)
To: Savin Zlobec; +Cc: ecos-discuss
Savin Zlobec <savin.zlobec@email.si> writes:
> On Mon, 20 Oct 2003 at 19:07:19, Nick Garnett wrote:
>
> > Savin Zlobec <savin@elatec.si> writes:
> >
> > > I need to write some filesystem specific functions.
> > > The get/setinfo calls seem to be the right way to do this,
> > > but I can't find any functions to access them from my application.
> > >
> > > The following functions would do the trick for me:
> > >
> > > int cyg_fs_getinfo(const char *path, int key, void *buf, int len);
> > > int cyg_fs_setinfo(const char *path, int key, void *buf, int len);
> > > int cyg_fs_fgetinfo(int fd, int key, void *buf, int len);
> > > int cyg_fs_fsetinfo(int fd, int key, void *buf. int len);
> > >
> > > Or is there any way to do this already without accessing internal
> > > structures?
> >
> > For filesystems you should be using ioctl() for these sorts of
> > out-of-band control operations. That's what it's there for, and more
> > than likely there is already a code defined for what you want to do.
>
> I could work with ioctl, but if the desired operation is filesystem
> oriented (as opposed to file oriented), then I would need to open a
> file just to get a file descriptor for use with ioctl.
>
> > What do you need these functions for?
>
> Currently I need fs info like total/free/used sectors count,
> status flags (if it was cleanly unmounted and if there were any IO errors).
> Later I may need some sort of special access to reserved sectors...
I see. Like mount()/umount() POSIX has not defined interface for these
sorts of things. Given that, then the functions you propose are
probably a worthwhile addition.
If you would like to submit a patch I'm sure that it will be accepted.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-10-22 9:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-20 12:41 [ECOS] Filesystem get/setinfo Savin Zlobec
2003-10-20 17:07 ` Nick Garnett
2003-10-20 18:25 ` Savin Zlobec
2003-10-22 9:32 ` Nick Garnett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).