[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

fp_getdevno Kernel Service

Purpose

Gets the device number or channel number for a device.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/file.h>

int fp_getdevno ( fp, devp, chanp)
struct file *fp;
dev_t *devp;
chan_t *chanp;

Parameters

fp Points to a file structure returned by the fp_open or fp_opendev service.
devp Points to a location where the device number is to be returned.
chanp Points to a location where the channel number is to be returned.

Description

The fp_getdevno service finds the device number and channel number for an open device that is associated with the file pointer specified by the fp parameter. If the value of either devp or chanp parameter is null, this service does not attempt to return any value for the argument.

Execution Environment

The fp_getdevno kernel service can be called from the process environment only.

Return Values

0 Indicates a successful operation.
EINVAL Indicates that the pointer specified by the fp parameter does not point to a file structure for an open device.

Implementation Specifics

The fp_getdevno kernel service is part of Base Operating System (BOS) Runtime.

Related Information

Logical File System Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]