Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - API's to get information on mounted file systems???: (3 Items)
   
API's to get information on mounted file systems???  
I'm in the process of porting the GIO module of glib to QNX and ran across some API's that are apparently lacking in 
Neutrino. There are several functions in GIO that retrieve information about mounted volumes. Typically, on Linux or 
FreeBSD systems one or more of the following functions are available:

setmntent()/getmntent()
These routines are used to access the file system description file /etc/fstab and the mounted file system description 
file /etc/mtab.

OR

getmntinfo()
The getmntinfo() function returns an array of statfs structures describing each currently mounted file system (see 
statfs(2)).

OR

mntctrl()
The mntctl subroutine is used to query the status of virtual file systems (also known as mounted file systems). Each 
virtual file system (VFS) is described by a vmount structure. This structure is supplied when the VFS is created by the 
vmount subroutine.

The GIO module uses at least one of the (above) APIs to implement its functionality. For now I've provided dummy "do-
nothing" functions for lack of a better substitute. I've looked through the QNX documentation (at least for 6.3.2) and 
it doesn't appear to be anything equivalent for getting information on mounted file systems. Can anyone offer 
suggestions/work-arounds that might provide the same functionality?
Re: API's to get information on mounted file systems???  
On Thu, Nov 06, 2008 at 09:10:12AM -0500, Glenn Schmottlach wrote:
> I'm in the process of porting the GIO module of glib to QNX and ran across some API's that are apparently lacking in 
Neutrino. There are several functions in GIO that retrieve information about mounted volumes. Typically, on Linux or 
FreeBSD systems one or more of the following functions are available:
> 
> setmntent()/getmntent()
> These routines are used to access the file system description file /etc/fstab and the mounted file system description 
file /etc/mtab.
> 
> OR
> 
> getmntinfo()
> The getmntinfo() function returns an array of statfs structures describing each currently mounted file system (see 
statfs(2)).
> 
> OR
> 
> mntctrl()
> The mntctl subroutine is used to query the status of virtual file systems (also known as mounted file systems). Each 
virtual file system (VFS) is described by a vmount structure. This structure is supplied when the VFS is created by the 
vmount subroutine.
> 
> The GIO module uses at least one of the (above) APIs to implement its functionality. For now I've provided dummy "do-
nothing" functions for lack of a better substitute. I've looked through the QNX documentation (at least for 6.3.2) and 
it doesn't appear to be anything equivalent for getting information on mounted file systems. Can anyone offer 
suggestions/work-arounds that might provide the same functionality?
> 

I came across this as well and added getmntinfo() and getfsstat() to
libnbutil.  libnbutil ships with 6.4 or you can get it as part of
the networking project on the foundry.

-seanb
Re: API's to get information on mounted file systems???  
Hello,

I am using the 6.5.0 version of the BSP. The libnutil doesn't exit. Do these functions exist in this version, or should 
they still be added. And if yes, where should they be added?
Thanks,
-Zahira