[Previous] [Contents] [Next]

resmgr_devino()

Get the device and inode number

Synopsis:

#include <sys/resmgr.h>

int resmgr_devino( int id,
                   dev_t *pdevno,
                   ino64_t *pino );

Library:

libc

Description:

The function resmgr_devino() fills in the structures pointed to by pdevno and pino with the device number and inode number extracted from id.

This function is typically used to fill in:

iofunc_mount_t->dev
iofunc_attr_t->inode

The major(), minor(), and makedev() macros can be used to work with device IDs. They're defined in <sys/types.h> and are described in the documentation for stat().

Returns:

-1 on error (errno is set); any other value on success.

Errors:

EINVAL
The id argument is invalid.

Examples:

#include <sys/resmgr.h>
#include <stdio.h>
#include <stdlib.h>
		
int main( void )
{
  iofunc_mount_t   mount;
  iofunc_attr_t    attr;

  ...
  attr.mount = &mount;
  ...
  id = resmgr_attach( ... )
  ...
  resmgr_devino(id, &mount.dev, &attr.inode);
  ...
  return EXIT_SUCCESS;
}

Classification:

QNX 6

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

SETIOV()


[Previous] [Contents] [Next]