mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader/simon.git] / modules / ps2fs / pfs_fioctl.h
blobf1ca4f73a99adb1d460bee09a0c70c42957dc342
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.
10 # $Id: pfs_fioctl.h 577 2004-09-14 14:41:46Z pixel $
13 #ifndef _PFS_FIOCTL_H
14 #define _PFS_FIOCTL_H
16 ///////////////////////////////////////////////////////////////////////////////
17 // Command macros
19 // PFS IOCTL2 commands
20 #define PFS_IOCTL2_MALLOC 0x7001
21 #define PFS_IOCTL2_FREE 0x7002
22 #define PFS_IOCTL2_ATTR_ADD 0x7003
23 #define PFS_IOCTL2_ATTR_DEL 0x7004
24 #define PFS_IOCTL2_ATTR_LOOKUP 0x7005
25 #define PFS_IOCTL2_ATTR_READ 0x7006
26 #define PFS_IOCTL2_GET_INODE 0x7007
28 // PFS DEVCTL commands
29 #define PFS_DEVCTL_GET_ZONE_SIZE 0x5001
30 #define PFS_DEVCTL_GET_ZONE_FREE 0x5002
31 #define PFS_DEVCTL_CLOSE_ALL 0x5003
32 #define PFS_DEVCTL_GET_STAT 0x5004
33 #define PFS_DEVCTL_CLEAR_STAT 0x5005
35 #define PFS_DEVCTL_SET_UID 0x5032
36 #define PFS_DEVCTL_SET_GID 0x5033
38 #define PFS_DEVCTL_SHOW_BITMAP 0xFF
40 ///////////////////////////////////////////////////////////////////////////////
41 // Function declerations
43 int pfsIoctl(iop_file_t *f, unsigned long arg, void *param);
44 int pfsIoctl2(iop_file_t *f, int cmd, void *arg, size_t arglen, void *buf, size_t buflen);
45 int pfsDevctl(iop_file_t *f, const char *name, int cmd, void *arg, size_t arglen, void *buf, size_t buflen);
47 void devctlCloseAll();
48 int devctlFsckStat(pfs_mount_t *pfsMount, int mode);
50 int ioctl2Attr(pfs_cache_t *clink, int cmd, void *arg, void *outbuf, u32 *offset);
51 pfs_aentry_t *getAentry(pfs_cache_t *clink, char *key, char *value, int mode);
52 int ioctl2AttrAdd(pfs_cache_t *clink, pfs_ioctl2attr_t *attr);
53 int ioctl2AttrDelete(pfs_cache_t *clink, void *arg);
54 int ioctl2AttrLoopUp(pfs_cache_t *clink, char *key, char *value);
55 int ioctl2AttrRead(pfs_cache_t *clink, pfs_ioctl2attr_t *attr, u32 *unkbuf);
57 int ioctl2Alloc(pfs_cache_t *clink, int msize, int mode);
58 void ioctl2Free(pfs_cache_t *pfree);
62 #endif /* _PFS_FIOCTL_H */