|
PS2SDK
PS2 Homebrew Libraries
|
Macros | |
| #define | DEVFS_MAX_SUBDEVS 16 |
| #define | DEVFS_MAX_DEVNAME_LENGTH 32 |
| #define | DEVFS_MAX_DESC_LENGTH 256 |
| #define | DEVFS_IOCTL_TYPE_1 1 |
| #define | DEVFS_IOCTL_TYPE_2 2 |
| #define | DEVFS_IOCTL_GETDESC 0 |
| #define | INVALID_HDEV -1 |
| #define | devfs_IMPORTS_start DECLARE_IMPORT_TABLE(devfs, 1, 1) |
| #define | devfs_IMPORTS_end END_IMPORT_TABLE |
| #define | I_DevFSAddDevice DECLARE_IMPORT(4, DevFSAddDevice) |
| #define | I_DevFSDelDevice DECLARE_IMPORT(5, DevFSDelDevice) |
| #define | I_DevFSAddSubDevice DECLARE_IMPORT(6, DevFSAddSubDevice) |
| #define | I_DevFSDelSubDevice DECLARE_IMPORT(7, DevFSDelSubDevice) |
Typedefs | |
| typedef s32 | HDEV |
| typedef s32(* | read_handler) (const devfs_info_t *dev, u8 *buf, s32 len) |
| typedef s32(* | write_handler) (const devfs_info_t *dev, u8 *buf, s32 len) |
| typedef s32(* | ioctl_handler) (const devfs_info_t *dev, int ioctl_type, int cmd, void *arg, size_t arglen, void *buf, size_t buflen) |
Enumerations | |
| enum | devfs_subdev_modes { DEVFS_MODE_EX = (1 << 0), DEVFS_MODE_W = (1 << 1), DEVFS_MODE_R = (1 << 2), DEVFS_MODE_RW = (DEVFS_MODE_R | DEVFS_MODE_W) } |
| enum | devfs_devtypes { DEVFS_DEVTYPE_CHAR = 1, DEVFS_DEVTYPE_BLOCK = 2, DEVFS_DEVTYPE_STREAM = 3 } |
Functions | |
| HDEV | DevFSAddDevice (const devfs_node_t *node) |
| int | DevFSDelDevice (HDEV hDev) |
| int | DevFSAddSubDevice (HDEV hDev, u32 subdev_no, s32 mode, devfs_loc_t extent, void *data) |
| int | DevFSDelSubDevice (HDEV hDev, u32 subdev_no) |
| #define DEVFS_MAX_SUBDEVS 16 |
#include <iop/fs/devfs/include/devfs.h>
Maximum number of sub devices per device
| #define DEVFS_MAX_DEVNAME_LENGTH 32 |
#include <iop/fs/devfs/include/devfs.h>
Maximum size of a device name
| #define DEVFS_MAX_DESC_LENGTH 256 |
#include <iop/fs/devfs/include/devfs.h>
Maximum length of a description string
| #define DEVFS_IOCTL_TYPE_1 1 |
#include <iop/fs/devfs/include/devfs.h>
Specifies ioctl was called. No return value and the lengths are invalid
| #define DEVFS_IOCTL_TYPE_2 2 |
#include <iop/fs/devfs/include/devfs.h>
ioctl2 was called. Parameters should all be valid
| #define DEVFS_IOCTL_GETDESC 0 |
#include <iop/fs/devfs/include/devfs.h>
ioctl command to return the description associated with a device
| #define INVALID_HDEV -1 |
#include <iop/fs/devfs/include/devfs.h>
Defines an invalid HDEV value
| typedef s32 HDEV |
#include <iop/fs/devfs/include/devfs.h>
Type to hold a handle to a device
| typedef s32(* read_handler) (const devfs_info_t *dev, u8 *buf, s32 len) |
#include <iop/fs/devfs/include/devfs.h>
Typedef of the read event handler
| typedef s32(* write_handler) (const devfs_info_t *dev, u8 *buf, s32 len) |
#include <iop/fs/devfs/include/devfs.h>
Typedef of the write event handler
| typedef s32(* ioctl_handler) (const devfs_info_t *dev, int ioctl_type, int cmd, void *arg, size_t arglen, void *buf, size_t buflen) |
#include <iop/fs/devfs/include/devfs.h>
Typedef of the ioctl handler
| enum devfs_subdev_modes |
#include <iop/fs/devfs/include/devfs.h>
Enumeration of sub device access modes
| enum devfs_devtypes |
#include <iop/fs/devfs/include/devfs.h>
Enumeration of device type.
| Enumerator | |
|---|---|
| DEVFS_DEVTYPE_CHAR | Indicates a device is character device |
| DEVFS_DEVTYPE_BLOCK | Indicates a device is a block device |
| DEVFS_DEVTYPE_STREAM | Indicates a device is a stream device (no seek) |
| HDEV DevFSAddDevice | ( | const devfs_node_t * | node | ) |
#include <iop/fs/devfs/include/devfs.h>
Adds a new device to the filing system
| node | Pointer to a devfs_node_t structure |
| int DevFSDelDevice | ( | HDEV | hDev | ) |
#include <iop/fs/devfs/include/devfs.h>
Define to add DevFSAddDevice to the imports list Deletes an previously opened device.
| hDev | Handle to the device to delete |
Definition at line 1162 of file devfs.c.
References devfs_find_deviceid(), DEVFS_MAX_SUBDEVS, and _devfs_device::forw.
| int DevFSAddSubDevice | ( | HDEV | hDev, |
| u32 | subdev_no, | ||
| s32 | mode, | ||
| devfs_loc_t | extent, | ||
| void * | data | ||
| ) |
#include <iop/fs/devfs/include/devfs.h>
Adds a sub device to a previously opened device
| hDev | Handle to an opened device |
| subdev_no | The number of the subdevice. Can be 0 to DEVFS_MAX_SUBDEVS |
| extent | A 64bit extent which reflects the size of the underlying device |
| data | Pointer to some private data to associate with this sub device |
| int DevFSDelSubDevice | ( | HDEV | hDev, |
| u32 | subdev_no | ||
| ) |
#include <iop/fs/devfs/include/devfs.h>
Deletes a sub device.
| hDev | Handle to an opened device. |
| subdev_no | The number of the subdevice to delete. |
Definition at line 1251 of file devfs.c.
References devfs_find_deviceid().