mirror of
https://git.freebsd.org/ports.git
synced 2025-06-30 17:10:33 -04:00
a monitor. It is mostly useful to read LCD matrix manufacturer and model. WWW: http://www.polypux.org/projects/read-edid/ NB: TIMESTAMP line in distinfo should read as follows, but has to stay in its current form due to a bug in the hook script: TIMESTAMP (read-edid-3.0.2.tar.gz) = 1430271430
34 lines
773 B
C
34 lines
773 B
C
--- get-edid/classic.c.orig 2015-04-29 01:08:34 UTC
|
|
+++ get-edid/classic.c
|
|
@@ -1,12 +1,12 @@
|
|
/* (c) 2000,2001,2002 John Fremlin */
|
|
/* (c) 2010,2011 Matthew Kern */
|
|
#ifdef CLASSICBUILD
|
|
+#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <assert.h>
|
|
#include <string.h>
|
|
#include <sys/types.h>
|
|
-#include <sys/io.h>
|
|
#include <unistd.h>
|
|
|
|
#include <libx86.h>
|
|
@@ -135,8 +135,17 @@ classicmain( unsigned contr, int qit )
|
|
return 10;
|
|
}
|
|
|
|
+#if defined(__linux__)
|
|
ioperm(0, 0x400 , 1);
|
|
iopl(3);
|
|
+#elif defined(__FreeBSD__)
|
|
+#define DEV_IO_PATH "/dev/io"
|
|
+ if (open(DEV_IO_PATH, O_RDONLY) < 0) {
|
|
+ display("%s(): failed to open %s\n", __func__, DEV_IO_PATH);
|
|
+ return 11;
|
|
+ }
|
|
+#undef DEV_IO_PATH
|
|
+#endif
|
|
|
|
|
|
/*if ( argc == 1 )
|