PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
iopmgr - IOP Manager

Functions

void list_all_libraries ()
 
void list_all_modules ()
 
void list_devices_ioman ()
 
void list_devices_iomanx ()
 
void list_fs_devices (int mgrtype)
 
void cmdline_handle (char *command, char *arg1)
 
iop_device_tiopmgr_get_iomandev (char *device)
 
iop_device_tiopmgr_get_iomanxdev (char *device)
 
int iopmgr_get_devicelist (int man, int devtype, char *buffer)
 
iop_device_tiopmgr_get_device (char *device)
 
int iopmgr_get_devicetype (char *device)
 
int _start (int argc, char *argv[])
 
int shutdown ()
 
iop_library_tslib_get_lib_by_name (const char *name)
 
void * slib_get_exportlist_by_name (const char *name)
 
int slib_get_version_by_name (const char *name)
 
int slib_release_library (const char *name)
 
ModuleInfo_tsmod_get_next_mod (ModuleInfo_t *cur_mod)
 
ModuleInfo_tsmod_get_mod_by_name (const char *name)
 
int smod_get_modcount_by_name (const char *name)
 
int smod_get_modversion_by_name (const char *name)
 
int smod_unload_module (const char *name)
 

Detailed Description

Function Documentation

◆ list_all_libraries()

void list_all_libraries ( )

#include <iop/system/iopmgr/src/commandline.c>

Prints out a list of all currently registered libraries with their name and version.

Definition at line 28 of file commandline.c.

Referenced by cmdline_handle().

◆ list_all_modules()

void list_all_modules ( )

#include <iop/system/iopmgr/src/commandline.c>

Prints out a list of all currently loaded IRX modules with description and version number.

Definition at line 52 of file commandline.c.

References smod_get_next_mod().

Referenced by cmdline_handle().

◆ list_devices_ioman()

void list_devices_ioman ( )

#include <iop/system/iopmgr/src/commandline.c>

Print out all devices for ONLY ioman and shows which one they belong to.

Definition at line 69 of file commandline.c.

References smod_get_mod_by_name(), and version.

Referenced by cmdline_handle().

◆ list_devices_iomanx()

void list_devices_iomanx ( )

#include <iop/system/iopmgr/src/commandline.c>

Print out all devices for ONLY iomanx and shows which one they belong to.

Definition at line 99 of file commandline.c.

References smod_get_mod_by_name(), and version.

Referenced by cmdline_handle().

◆ list_fs_devices()

void list_fs_devices ( int  mgrtype)

#include <iop/system/iopmgr/src/commandline.c>

Print out all devices for both ioman and iomanx and shows which one they belong to.

Parameters
mgrtypeDevice manager type search mask (IOPMGR_DEVTYPE_XXXX).

Definition at line 131 of file commandline.c.

References count, iopmgr_get_devicelist(), and iopmgr_get_devicetype().

Referenced by cmdline_handle().

◆ cmdline_handle()

void cmdline_handle ( char *  command,
char *  arg1 
)

#include <iop/system/iopmgr/src/commandline.c>

Handles basic parsing of commands, for command execution mode.

Parameters
commandPointer to command string.

Definition at line 161 of file commandline.c.

References list_all_libraries(), list_all_modules(), list_devices_ioman(), list_devices_iomanx(), list_fs_devices(), shutdown(), and slib_release_library().

Referenced by _start().

◆ iopmgr_get_iomandev()

iop_device_t * iopmgr_get_iomandev ( char *  device)

#include <iop/system/iopmgr/src/devices.c>

Get a pointer to an ioman device handler.

Parameters
deviceStringname of device (eg "host").
Returns
Pointer to device structure.

return values: 0 if not found. pointer to device structure for named driver if found.

Definition at line 34 of file devices.c.

References smod_get_mod_by_name().

Referenced by iopmgr_get_device(), and iopmgr_get_devicetype().

◆ iopmgr_get_iomanxdev()

iop_device_t * iopmgr_get_iomanxdev ( char *  device)

#include <iop/system/iopmgr/src/devices.c>

Get a pointer to an iomanx device handler.

Parameters
deviceStringname of device (eg "hdd").
Returns
Pointer to device structure.

return values: 0 if not found. pointer to device structure for named driver if found.

Definition at line 67 of file devices.c.

References smod_get_mod_by_name().

Referenced by iopmgr_get_device(), and iopmgr_get_devicetype().

◆ iopmgr_get_devicelist()

int iopmgr_get_devicelist ( int  man,
int  devtype,
char *  buffer 
)

#include <iop/system/iopmgr/src/devices.c>

Get a list of devices of a certain type

Parameters
manDevice manager mask (IOPMGR_DEVTYPE_IOMAN or IOPMGR_DEVTYPE_IOMANX).
devtypeDevice type mask (0x10 for filesystems).
Returns
Number of devices found

return values: 0 if no matching devices found device count, if found, and buffer buffer filled with ascii serial string of device names.

Definition at line 102 of file devices.c.

References count, IOP_DT_FSEXT, and smod_get_mod_by_name().

Referenced by list_fs_devices().

◆ iopmgr_get_device()

iop_device_t * iopmgr_get_device ( char *  device)

#include <iop/system/iopmgr/src/devices.c>

Get a pointer to a device of either type

Parameters
deviceStringname of device (eg "host).
Returns
Pointer to device structure.

return values: 0 if not found. pointer to device structure for named driver if found.

Definition at line 163 of file devices.c.

References iopmgr_get_iomandev(), and iopmgr_get_iomanxdev().

◆ iopmgr_get_devicetype()

int iopmgr_get_devicetype ( char *  device)

#include <iop/system/iopmgr/src/devices.c>

Returns which i/o manager handles the given device.

Parameters
deviceStringname of device (eg "host).
Returns
numeric value for i/o manager.

return values: IOPMGR_DEVTYPE_INVALID if not found, IOPMGR_DEVTYPE_IOMAN if found and ioman device, IOPMGR_DEVTYPE_IOMANX if found and iomanx device.

Definition at line 184 of file devices.c.

References iopmgr_get_iomandev(), and iopmgr_get_iomanxdev().

Referenced by list_fs_devices().

◆ _start()

int _start ( int  argc,
char *  argv[] 
)

#include <iop/system/iopmgr/src/main.c>

Entry point for IRX.

if argc <= 1 , install as library. if argc > 1 , run given command in argv[1].

Parameters
argcNumber of arguments.
argvPointer to array of arguments.
Returns
Module Status on Exit.

return values: MODULE_RESIDENT_END if loaded and registered as library. MODULE_NO_RESIDENT_END if just exiting normally.

Definition at line 46 of file main.c.

References cmdline_handle(), smod_get_modversion_by_name(), and version.

◆ shutdown()

int shutdown ( void  )

#include <iop/system/iopmgr/src/main.c>

shutdown the IRX.

This checks if the library is registered, if it is then it unregisters it.

Returns
Module Status on Exit.

return values: MODULE_RESIDENT_END if loaded and registered as library. MODULE_NO_RESIDENT_END if just exiting normally.

Definition at line 99 of file main.c.

References slib_release_library().

◆ slib_get_lib_by_name()

iop_library_t * slib_get_lib_by_name ( const char *  name)

#include <iop/system/iopmgr/src/slib.c>

Get pointer to system library structure for named library.

Parameters
nameStringname of library (eg "ioman").
Returns
Pointer to IOP library structure.

return values: 0 if not found. pointer to library structure for registered library if found.

Definition at line 37 of file slib.c.

Referenced by slib_get_exportlist_by_name(), slib_get_version_by_name(), and slib_release_library().

◆ slib_get_exportlist_by_name()

void * slib_get_exportlist_by_name ( const char *  name)

#include <iop/system/iopmgr/src/slib.c>

Get pointer to export list for named library.

Parameters
nameStringname of library (eg "ioman").
Returns
Pointer to export list.

return values: 0 if not found. pointer to export list for registered library if found.

Definition at line 62 of file slib.c.

References slib_get_lib_by_name().

◆ slib_get_version_by_name()

int slib_get_version_by_name ( const char *  name)

#include <iop/system/iopmgr/src/slib.c>

Get version number for named library.

Parameters
nameStringname of library (eg "ioman").
Returns
version number.

return values: 0 if not found. Version number for registered library if found. (0xXXYY, XX=HIGH, YY=LOW)

Definition at line 82 of file slib.c.

References slib_get_lib_by_name().

◆ slib_release_library()

int slib_release_library ( const char *  name)

#include <iop/system/iopmgr/src/slib.c>

Release (Unregister) a given named registered library.

Parameters
nameStringname of library (eg "ioman").
Returns
Status of operation.

return values: 0 if found and sucessfully unregistered. -1 if found, but failed to unregister. -2 if library was not found.

Definition at line 103 of file slib.c.

References slib_get_lib_by_name().

Referenced by cmdline_handle(), and shutdown().

◆ smod_get_next_mod()

ModuleInfo_t * smod_get_next_mod ( ModuleInfo_t cur_mod)

#include <iop/system/iopmgr/src/smod.c>

Get pointer to head of module list, or next module in list.

Parameters
cur_modPointer to module structure, or 0 to return the head.
Returns
Pointer to module structure.

return values: 0 if end of list. pointer to head of module list if cur_mod=0. pointer to next module, if cur_mod!=0.

Definition at line 39 of file smod.c.

References tag_LC_internals::image_info.

◆ smod_get_mod_by_name()

ModuleInfo_t * smod_get_mod_by_name ( const char *  name)

#include <iop/system/iopmgr/src/smod.c>

Get pointer to module structure for named module.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Pointer to module structure.

return values: 0 if not found. pointer to module structure for loaded module if found.

Definition at line 63 of file smod.c.

References smod_get_next_mod().

◆ smod_get_modcount_by_name()

int smod_get_modcount_by_name ( const char *  name)

#include <iop/system/iopmgr/src/smod.c>

Get instance count for given module name.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Number of instances loaded.

NOTE: if doing this to check for own module, the run being used to check automatically adds one to the count.. so ret=2 means another, instance loaded as well as current one.

Definition at line 88 of file smod.c.

References count, and smod_get_next_mod().

◆ smod_get_modversion_by_name()

int smod_get_modversion_by_name ( const char *  name)

#include <iop/system/iopmgr/src/smod.c>

Get version number for given module name.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Version number.

return values: 0 if not found. Version number for module if found. (0xXXYY, XX=HIGH, YY=LOW)

Definition at line 115 of file smod.c.

References smod_get_mod_by_name().

Referenced by _start().

◆ smod_unload_module()

int smod_unload_module ( const char *  name)

#include <iop/system/iopmgr/src/smod.c>

Unload the named module.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Status of operation.

return values: 0 if found and sucessfully unloaded. -1 if found, but failed to unload. -2 if module was not found.

Definition at line 136 of file smod.c.