HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Confusion with libIO APIs:io_search()
Operating System - Linux
1827892
Members
1895
Online
109969
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2007 02:08 AM
09-25-2007 02:08 AM
Confusion with libIO APIs:io_search()
Hi,
Recently i found one white paper on libIO APIs for HPUX 11i V3.
http://docs.hp.com/en/oshpux11iv3.html
"Using the HP-UX libIO Library"
I'm not much of a programmer and was wondering why one of the variable(instance) in example 2 from the same doc is initialized to 2 ?
snip from the code:
if((node = io_search((io_token_t)NULL,S_IOTREE,Q_SW,"instance",&instance,"class","disk",NULL)) == NULL){
io_error("io_search error");
exit(1);
}
Beside this, Running the same program on my machine is giving me error message:
root@hpia7/LIBIO/ $ cc -lIO -o example2 ex2.c
root@hpia7/LIBIO/ $ ./example2
io_search error: No match found <====
snip from /usr/include/sys/libIO.h
/* Definitions for libIO io_errno values */
IO_E_MATCH =16,/* No match found */
~amit
Recently i found one white paper on libIO APIs for HPUX 11i V3.
http://docs.hp.com/en/oshpux11iv3.html
"Using the HP-UX libIO Library"
I'm not much of a programmer and was wondering why one of the variable(instance) in example 2 from the same doc is initialized to 2 ?
snip from the code:
if((node = io_search((io_token_t)NULL,S_IOTREE,Q_SW,"instance",&instance,"class","disk",NULL)) == NULL){
io_error("io_search error");
exit(1);
}
Beside this, Running the same program on my machine is giving me error message:
root@hpia7/LIBIO/ $ cc -lIO -o example2 ex2.c
root@hpia7/LIBIO/ $ ./example2
io_search error: No match found <====
snip from /usr/include/sys/libIO.h
/* Definitions for libIO io_errno values */
IO_E_MATCH =16,/* No match found */
~amit
- Tags:
- libIO
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2007 01:26 AM
09-29-2007 01:26 AM
Re: Confusion with libIO APIs:io_search()
>why one of the variable (instance) in example 2 from the same doc is initialized to 2?
The call to io_search is asking for instance 2 for class == "disk".
If you put instance in a loop I get:
$ a.out
class instance hardware path driver name state type
disk 0 0/1/1/0.0.0 sdisk CLAIMED DEVICE
disk 1 0/1/1/1.2.0 sdisk CLAIMED DEVICE
disk 2 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE
Error:io_search: No match found.
The call to io_search is asking for instance 2 for class == "disk".
If you put instance in a loop I get:
$ a.out
class instance hardware path driver name state type
disk 0 0/1/1/0.0.0 sdisk CLAIMED DEVICE
disk 1 0/1/1/1.2.0 sdisk CLAIMED DEVICE
disk 2 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE
Error:io_search: No match found.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP