Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ddi_get_instance(9f) [sunos man page]

ddi_get_instance(9F)					   Kernel Functions for Drivers 				      ddi_get_instance(9F)

NAME
ddi_get_instance - get device instance number SYNOPSIS
#include <sys/ddi.h> #include <sys/sunddi.h> int ddi_get_instance(dev_info_t *dip); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
dip Pointer to dev_info structure. DESCRIPTION
ddi_get_instance() returns the instance number of the device corresponding to dip. The system assigns an instance number to every device. Instance numbers for devices attached to the same driver are unique. This pro- vides a way for the system and the driver to uniquely identify one or more devices of the same type. The instance number is derived by the system from different properties for different device types in an implementation specific manner. Once an instance number has been assigned to a device, it will remain the same even across reconfigurations and reboots. Therefore, instance numbers seen by a driver may not appear to be in consecutive order. For example, if device foo0 has been assigned an instance number of 0 and device foo1 has been assigned an instance number of 1, if foo0 is removed, foo1 will continue to be associated with instance number 1 (even though foo1 is now the only device of its type on the system). RETURN VALUES
ddi_get_instance() returns the instance number of the device corresponding to dip. CONTEXT
ddi_get_instance()can be called from user or interrupt context. SEE ALSO
path_to_inst(4) Writing Device Drivers SunOS 5.10 20 Jul 1994 ddi_get_instance(9F)

Check Out this Related Man Page

ddi_get_instance(9F)					   Kernel Functions for Drivers 				      ddi_get_instance(9F)

NAME
ddi_get_instance - get device instance number SYNOPSIS
#include <sys/ddi.h> #include <sys/sunddi.h> int ddi_get_instance(dev_info_t *dip); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
dip Pointer to dev_info structure. DESCRIPTION
ddi_get_instance() returns the instance number of the device corresponding to dip. The system assigns an instance number to every device. Instance numbers for devices attached to the same driver are unique. This pro- vides a way for the system and the driver to uniquely identify one or more devices of the same type. The instance number is derived by the system from different properties for different device types in an implementation specific manner. Once an instance number has been assigned to a device, it will remain the same even across reconfigurations and reboots. Therefore, instance numbers seen by a driver may not appear to be in consecutive order. For example, if device foo0 has been assigned an instance number of 0 and device foo1 has been assigned an instance number of 1, if foo0 is removed, foo1 will continue to be associated with instance number 1 (even though foo1 is now the only device of its type on the system). RETURN VALUES
ddi_get_instance() returns the instance number of the device corresponding to dip. CONTEXT
ddi_get_instance()can be called from user or interrupt context. SEE ALSO
path_to_inst(4) Writing Device Drivers SunOS 5.10 20 Jul 1994 ddi_get_instance(9F)
Man Page

4 More Discussions You Might Find Interesting

1. AIX

Removing devices from ODM

I have replace a couple of hdisks in and old AIX 4 system. I have them assigned to the hdisk numbers previously in the system. When I don an lsvg -p vgname, i see them old devices by device number still come up as missing. I think they are still in the ODM,, how can I remove them? Thanks Mike (5 Replies)
Discussion started by: mhenryj
5 Replies

2. Programming

Where can I find Linux functions corresponding to the Solaris DDI?

Hello, I'm not sure whether this thread is in the right subforum, if it isn't please excuse me. So, here's my question - right now I'm trying to port a Solaris device driver for a custom piece of hardware to Linux (2.6.15), and I'm having some troubles finding the proper corresponding... (3 Replies)
Discussion started by: boyanov
3 Replies

3. UNIX for Dummies Questions & Answers

jus a minor issue. please assist if possible.

for an assignment i'm working on i have 2 minor issues with my code for the lines to be displayed after entering a line of code i.e:- $ ls- l foo1.c foo1.c not found $ recycle -rw-r--r-- 1 usr user 31 foo1.c -rw-r--r-- 1 usr user 31 foo2.c this is my working code . ... (1 Reply)
Discussion started by: jerryboy78
1 Replies

4. Shell Programming and Scripting

Need to delete all lines where any line meets a condition

Here is an example of a file... foo1,good foo1,good foo2,error foo2,good Note that both rows for foo1 have good in the 2nd field, but one of the foo2 rows has error... I need something in ksh/awk/perl that will delete ALL foo2 lines if ANY of them have error in the 2nd field...so: ... (7 Replies)
Discussion started by: dbiggied
7 Replies