Checkin per Jason Vandermark.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@296 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "OS.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Sequentially search for valid ports by port number and display
|
||||||
|
// their properties.
|
||||||
|
//
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
port_info info;
|
||||||
|
|
||||||
|
for (int port_num = 0; port_num < 9999; port_num++)
|
||||||
|
{
|
||||||
|
if (B_OK == get_port_info(port_num, &info) )
|
||||||
|
{
|
||||||
|
// Found a valid port - display it's properties.
|
||||||
|
//
|
||||||
|
printf("%04u: Team %u - %s\n",
|
||||||
|
(unsigned int)info.port,
|
||||||
|
(unsigned int)info.team,
|
||||||
|
info.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user