PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
fakehost.c File Reference
#include "types.h"
#include "loadcore.h"
#include "stdio.h"
#include "sysclib.h"
#include <errno.h>
#include "thbase.h"
#include "intrman.h"
#include "sysmem.h"
#include "sifman.h"
#include "sifcmd.h"
#include "iomanX.h"
#include "ioman_mod.h"
+ Include dependency graph for fakehost.c:

Go to the source code of this file.

Macros

#define TRUE   1
 
#define FALSE   0
 
#define MODNAME   "fakehost"
 
#define FS_REPNAME   "host"
 
#define M_PRINTF(format, args...)    printf(MODNAME ": " format, ##args)
 
#define M_DEBUG(format, args...)
 

Functions

 IRX_ID (MODNAME, 1, 1)
 
int ttyMount (void)
 
int naplinkRpcInit (void)
 
char * fd_name (char *buffer, const char *name)
 
int fd_save (int fd, iop_io_file_t *f)
 
int realfd (iop_io_file_t *f)
 
int dummy ()
 
int fd_initialize (iop_io_device_t *driver)
 
int fd_open (iop_io_file_t *f, const char *name, int mode)
 
int fd_close (iop_io_file_t *f)
 
int fd_read (iop_io_file_t *f, void *buffer, int size)
 
int fd_write (iop_io_file_t *fd, void *buffer, int size)
 
int fd_lseek (iop_io_file_t *fd, int offset, int whence)
 
int _start (int argc, char *argv[])
 

Variables

static char base [100]
 
static int fd_global
 
static iop_io_device_ops_t functions
 
static iop_io_device_t driver
 

Detailed Description

IOP filesystem driver v1.0 This redirects an iomanx device (eg a pfs mount point) the ioman device called 'host' it also installs a naplink RPC driver. This basically sets up ready to run programs as though they were run from naplink or pukklink, regarding host and naplink printf.

Definition in file fakehost.c.

Macro Definition Documentation

◆ TRUE

#define TRUE   1

Definition at line 36 of file fakehost.c.

◆ FALSE

#define FALSE   0

Definition at line 37 of file fakehost.c.

◆ MODNAME

#define MODNAME   "fakehost"

Definition at line 41 of file fakehost.c.

◆ FS_REPNAME

#define FS_REPNAME   "host"

Definition at line 44 of file fakehost.c.

◆ M_PRINTF

#define M_PRINTF (   format,
  args... 
)     printf(MODNAME ": " format, ##args)

Definition at line 48 of file fakehost.c.

◆ M_DEBUG

#define M_DEBUG (   format,
  args... 
)

Definition at line 54 of file fakehost.c.

Variable Documentation

◆ base

char base[100]
static

Definition at line 58 of file fakehost.c.

◆ fd_global

int fd_global
static

Definition at line 60 of file fakehost.c.

◆ functions

iop_io_device_ops_t functions
static
Initial value:
= {
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
(void *)&dummy,
}
int fd_open(iop_io_file_t *f, const char *name, int mode)
Definition fakehost.c:136
int fd_close(iop_io_file_t *f)
Definition fakehost.c:154
int fd_initialize(iop_io_device_t *driver)
Definition fakehost.c:122
int dummy()
Definition fakehost.c:110
int fd_read(iop_io_file_t *f, void *buffer, int size)
Definition fakehost.c:167
int fd_lseek(iop_io_file_t *fd, int offset, int whence)
Definition fakehost.c:193

Definition at line 199 of file fakehost.c.

◆ driver

iop_io_device_t driver
static
Initial value:
= {
FS_REPNAME,
16,
1,
"host redirection driver",
&functions,
}

Definition at line 220 of file fakehost.c.