PS2SDK
PS2 Homebrew Libraries
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#ifndef __FILEXIO_RPC_H__
17#define __FILEXIO_RPC_H__
18
19#include <fileXio.h>
20#include <sys/stat.h>
21
22#ifndef NEWLIB_PORT_AWARE
23#error "Using fio/fileXio functions directly in the newlib port will lead to problems."
24#error "Use posix function calls instead."
25#endif
26
27#define FXIO_WAIT 0
28#define FXIO_NOWAIT 1
29
30#define FXIO_COMPLETE 1
31#define FXIO_INCOMPLETE 0
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37extern int fileXioInit(void);
38extern void fileXioExit(void);
39extern void fileXioSetBlockMode(int blocking);
40extern int fileXioWaitAsync(int mode, int *retVal);
41
42extern void fileXioStop();
43extern int fileXioGetDeviceList(struct fileXioDevice deviceEntry[], unsigned int req_entries);
44extern int fileXioGetdir(const char* pathname, struct fileXioDirEntry DirEntry[], unsigned int req_entries);
45extern int fileXioMount(const char* mountpoint, const char* blockdev, int flag);
46extern int fileXioUmount(const char* mountpoint);
47extern int fileXioCopyfile(const char* source, const char* dest, int mode);
48extern int fileXioMkdir(const char* pathname, int mode);
49extern int fileXioRmdir(const char* pathname);
50extern int fileXioRemove(const char* pathname);
51extern int fileXioRename(const char* source, const char* dest);
52extern int fileXioSymlink(const char* source, const char* dest);
53extern int fileXioReadlink(const char* source, char* buf, unsigned int buflen);
54extern int fileXioChdir(const char* pathname);
55extern int fileXioOpen(const char* source, int flags, ...);
56extern int fileXioClose(int fd);
57extern int fileXioRead(int fd, void *buf, int size);
58extern int fileXioWrite(int fd, const void *buf, int size);
59extern int fileXioLseek(int fd, int offset, int whence);
60extern s64 fileXioLseek64(int fd, s64 offset, int whence);
61extern int fileXioChStat(const char *name, iox_stat_t *stat, int mask);
62extern int fileXioGetStat(const char *name, iox_stat_t *stat);
63extern int fileXioFormat(const char *dev, const char *blockdev, const void *args, int arglen);
64extern int fileXioSync(const char *devname, int flag);
65extern int fileXioDopen(const char *name);
66extern int fileXioDclose(int fd);
67extern int fileXioDread(int fd, iox_dirent_t *dirent);
68extern int fileXioDevctl(const char *name, int cmd, void *arg, unsigned int arglen, void *buf,unsigned int buflen);
69extern int fileXioIoctl(int fd, int cmd, void *arg);
70extern int fileXioIoctl2(int fd, int command, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
71extern int fileXioSetRWBufferSize(int size);
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif /* __FILEXIO_RPC_H__ */
Definition fileXio.h:100