403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/read-edid/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/read-edid/files/patch-get-edid_classic.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>
@@ -26,7 +26,7 @@ typedef byte* real_ptr;
 #define dosmemput(buffer,length,offset) memcpy(offset,buffer,length)
 
 #define display(...) if (quiet == 0) { fprintf(stderr, __VA_ARGS__); }
-int quiet;
+extern int quiet;
 
 real_ptr far_ptr_to_real_ptr( uint32 farptr )
 {
@@ -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 )

Youez - 2016 - github.com/yon3zu
LinuXploit