sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
fileXio_rpc.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16
17#ifndef __FILEXIO_RPC_H__
18#define __FILEXIO_RPC_H__
19
20#include <fileXio.h>
21#include <sys/stat.h>
22
23#ifndef NEWLIB_PORT_AWARE
24#error "Using fio/fileXio functions directly in the newlib port will lead to problems."
25#error "Use posix function calls instead."
26#endif
27
28#define FXIO_WAIT 0
29#define FXIO_NOWAIT 1
30
31#define FXIO_COMPLETE 1
32#define FXIO_INCOMPLETE 0
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38extern int fileXioInit(void);
39extern void fileXioExit(void);
40extern void fileXioSetBlockMode(int blocking);
41extern int fileXioWaitAsync(int mode, int *retVal);
42
43extern void fileXioStop();
44extern int fileXioGetDeviceList(struct fileXioDevice deviceEntry[], unsigned int req_entries);
45extern int fileXioGetdir(const char* pathname, struct fileXioDirEntry DirEntry[], unsigned int req_entries);
46extern int fileXioMount(const char* mountpoint, const char* blockdev, int flag);
47extern int fileXioUmount(const char* mountpoint);
48extern int fileXioCopyfile(const char* source, const char* dest, int mode);
49extern int fileXioMkdir(const char* pathname, int mode);
50extern int fileXioRmdir(const char* pathname);
51extern int fileXioRemove(const char* pathname);
52extern int fileXioRename(const char* source, const char* dest);
53extern int fileXioSymlink(const char* source, const char* dest);
54extern int fileXioReadlink(const char* source, char* buf, unsigned int buflen);
55extern int fileXioChdir(const char* pathname);
56extern int fileXioOpen(const char* source, int flags, ...);
57extern int fileXioClose(int fd);
58extern int fileXioRead(int fd, void *buf, int size);
59extern int fileXioWrite(int fd, const void *buf, int size);
60extern int fileXioLseek(int fd, int offset, int whence);
61extern s64 fileXioLseek64(int fd, s64 offset, int whence);
62extern int fileXioChStat(const char *name, iox_stat_t *stat, int mask);
63extern int fileXioGetStat(const char *name, iox_stat_t *stat);
64extern int fileXioFormat(const char *dev, const char *blockdev, const void *args, int arglen);
65extern int fileXioSync(const char *devname, int flag);
66extern int fileXioDopen(const char *name);
67extern int fileXioDclose(int fd);
68extern int fileXioDread(int fd, iox_dirent_t *dirent);
69extern int fileXioDevctl(const char *name, int cmd, void *arg, unsigned int arglen, void *buf,unsigned int buflen);
70extern int fileXioIoctl(int fd, int cmd, void *arg);
71extern int fileXioIoctl2(int fd, int command, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
72extern int fileXioSetRWBufferSize(int size);
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* __FILEXIO_RPC_H__ */