#include #include #include #include #include #include #include #include #include #include #include #include #include #include "stioctl.h" int main(int argc, char* argv[]) { int fbfd = 0; int vLoop, vLoop1; void* buffer; unsigned long request; char dummy_struct[65536]; // Open the file for reading and writing fbfd = open("/dev/stapi/stlayer_ioctl", O_RDWR); if (!fbfd) { printf("Error: cannot open stlayer device.\n"); exit(1); } printf("The stlayer device was opened successfully.\n"); for (vLoop = 0x00002900; vLoop < 0x0000FFFF; vLoop++) { request = vLoop; printf("Testing request = 0x%00000000x\n", request); memset(dummy_struct, 0, 1000); if (ioctl(fbfd, request, &dummy_struct) != 0) { exit(2); } else { printf("Data: 0x"); for (vLoop1 = 0; vLoop1 < 32; vLoop1++) printf("%0x", dummy_struct[vLoop1]); printf("\n"); } } close(fbfd); return 0; }