#include #include "sbusprobe.h" void printsbusDevices( int n, struct sbusDevice **devs, char *type ) { int i, j; if (n<0) { fprintf(stderr, "System error!\n"); exit(1); } else if (n==0) { printf("No SBUS devices of type %s found.\n", type); } else { for (i=0; inhits); for (j=0; jnhits; j++) { printf(" Match %d: |%s| -> |%s|\n", j, devs[i]->name[j], devs[i]->module[j]); } if (devs[i]->class == SBUS_VIDEO) { printf(" Resolution %dx%d", devs[i]->fb->width, devs[i]->fb->height); if (devs[i]->fb->freq) printf("%d", devs[i]->fb->freq); if (devs[i]->fb->monitor != -1) printf(" Monitor type %d\n", devs[i]->fb->monitor); else printf("\n"); } } } } int main () { int i, n; struct sbusDevice **devs; printf("Probing for ETHERNET devices....\n"); n = sbusProbeDevice(SBUS_ETHERNET, &devs); printsbusDevices(n, devs, "Ethernet"); for (i=0; i