find the file system mount point for a device
#include <sys/fsys.h>
int fsys_get_mount_pt( const char *device,
char *directory );
The fsys_get_mount_pt() function finds and returns the file system mount point (directory) associated with the named device. For instance, if you have a device /dev/hd0t77 mounted as your root, you could use the name to find that directory name (/).
#include <limits.h>
#include <sys/fsys.h>
void main(int argc, char **argv)
{
char buf[_POSIX_PATH_MAX];
fsys_get_mount_pt( argv[1], buf );
printf( "device '%s' mounted as: %s\n",
argv[1], buf );
}
QNX
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | Yes, but modifies errno |
| Thread | Yes |