mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 23:16:05 +00:00
Disable r2k for GNU Hurd
This commit is contained in:
parent
6e9ae1772b
commit
be6622e318
@ -9,7 +9,7 @@
|
||||
|
||||
#if __WINDOWS__
|
||||
#include "io_r2k_windows.h"
|
||||
#elif __linux__
|
||||
#elif defined (__linux__) && !defined (__GNU__)
|
||||
#include "io_r2k_linux.h"
|
||||
struct io_r2k_linux r2k_struct;
|
||||
#endif
|
||||
@ -18,7 +18,7 @@ int r2k__write(RIO *io, RIODesc *fd, const ut8 *buf, int count) {
|
||||
#if __WINDOWS__
|
||||
//eprintf("writing to: 0x%"PFMT64x" len: %x\n",io->off, count);
|
||||
return WriteKernelMemory (io->off, buf, count);
|
||||
#elif __linux__
|
||||
#elif defined (__linux__) && !defined (__GNU__)
|
||||
if (r2k_struct.beid == 0) {
|
||||
return WriteMemory (io, fd, IOCTL_WRITE_KERNEL_MEMORY, r2k_struct.pid, io->off, buf, count);
|
||||
} else if (r2k_struct.beid == 1) {
|
||||
@ -38,7 +38,7 @@ int r2k__write(RIO *io, RIODesc *fd, const ut8 *buf, int count) {
|
||||
static int r2k__read(RIO *io, RIODesc *fd, ut8 *buf, int count) {
|
||||
#if __WINDOWS__
|
||||
return ReadKernelMemory (io->off, buf, count);
|
||||
#elif __linux__
|
||||
#elif defined (__linux__) && !defined (__GNU__)
|
||||
if (r2k_struct.beid == 0) {
|
||||
return ReadMemory (io, fd, IOCTL_READ_KERNEL_MEMORY, r2k_struct.pid, io->off, buf, count);
|
||||
} else if (r2k_struct.beid == 1) {
|
||||
@ -63,7 +63,7 @@ static int r2k__close(RIODesc *fd) {
|
||||
CloseHandle (gHandleDriver);
|
||||
StartStopService ("r2k",TRUE);
|
||||
}
|
||||
#elif __linux__
|
||||
#elif defined (__linux__) && !defined (__GNU__)
|
||||
if (fd) {
|
||||
close (fd->fd);
|
||||
}
|
||||
@ -88,7 +88,7 @@ static int r2k__system(RIO *io, RIODesc *fd, const char *cmd) {
|
||||
GetSystemModules (io);
|
||||
#endif
|
||||
} else {
|
||||
#if __linux__
|
||||
#if defined (__linux__) && !defined (__GNU__)
|
||||
return run_ioctl_command (io, fd, cmd);
|
||||
#else
|
||||
eprintf ("Try: '=!mod'\n '.=!mod'\n");
|
||||
@ -107,7 +107,7 @@ static RIODesc *r2k__open(RIO *io, const char *pathname, int rw, int mode) {
|
||||
return NULL;
|
||||
}
|
||||
return r_io_desc_new (&r_io_plugin_r2k, -1, pathname, rw, mode, w32);
|
||||
#elif __linux__
|
||||
#elif defined (__linux__) && !defined (__GNU__)
|
||||
int fd = open ("/dev/r2k", O_RDONLY);
|
||||
if (fd == -1) {
|
||||
io->cb_printf ("r2k__open: Error in opening /dev/r2k.");
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifndef __GNU__
|
||||
|
||||
#include "io_r2k_linux.h"
|
||||
|
||||
#define fset(num, shift) (((num & (((ut64) 1) << shift)) == 0) ? 0 : 1)
|
||||
@ -753,3 +755,5 @@ int run_ioctl_command(RIO *io, RIODesc *iodesc, const char *buf) {
|
||||
free (databuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user