Ok, I'm trying to get a screenblank running on my Amiga. I patched
screenblank to use grf ioctls instead of the sun fb ioctls. No
go. It comiles, but doesn't actually blank the screen.
When I issue my blank ioctl, the cursor goes to the top of the screen.
The unblank ioctl does nothing. I am working on a new kernel compile,
perhaps my kernel is out of sync with the includes. But try these
two programs out and tell me if I am missing something.
Also, I noticed that when doing HEAVY NFS stuff, my ed0 resets.
It doesn't seem to cause anything to hang, it just resets.
I was doing a kernel compile over NFS, and the ed0 just kept
resetting. The compile proceeded, and eventually finished, but
I never could figure out why the ethernet card kept doing that.
Another thing:
How can I, in a program at compile time, figure out what kind of
machine I am on? Is MACHINE #defined for me? I would like to
patch screenblank so it will compile just about anywhere.
______________________
/* Grfoff: Test program by Kevin P. Neal */
#include <sys/ioctl.h>
#include <stdio.h>
#include <amiga/dev/grfioctl.h>
int main(int argc, char **argv)
{
int fd;
if ((fd = open("/dev/grf0", 1)) < 0) {
printf("Error: Open\n");
}
if (ioctl(fd, GRFIOCOFF, 0) < 0)
printf("Error: Ioctl\n");
(void)close(fd);
return(0);
}
------------------------
/* Grfon: Test program by Kevin P. Neal */
#include <sys/ioctl.h>
#include <stdio.h>
#include <amiga/dev/grfioctl.h>
int main(int argc, char **argv)
{
int fd;
if ((fd = open("/dev/grf0", 1)) < 0) {
printf("Error: Open\n");
}
if (ioctl(fd, GRFIOCON, 0) < 0)
printf("Error: Ioctl\n");
(void)close(fd);
return(0);
}
----------------------------
XCOMM --------------------------------------------------------
XCOMM Kevin P. Neal, Sophomore CSC/CPE kpneal@eos.ncsu.edu
XCOMM North Carolina State University kevinneal@bix.com
XCOMM --------------------------------------------------------