http://wiibrew.org/wiki/Eject_DVD
It doesn't use cIOS, but it will likely eject your DVD. Source is included:
CODE#include
#include
#include
#include
static void *xfb = NULL;
static GXRModeObj *rmode = NULL;
//---------------------------------------------------------------------------------
int main(int argc, char **argv) {
//---------------------------------------------------------------------------------
ÂÂÂÂ// Initialise the DVD system
ÂÂÂÂDI_Init();
ÂÂÂÂ
ÂÂÂÂ// Initialise the video system
ÂÂÂÂVIDEO_Init();
ÂÂÂÂ
ÂÂÂÂ// Obtain the preferred video mode from the system
ÂÂÂÂ// This will correspond to the settings in the Wii menu
ÂÂÂÂrmode = VIDEO_GetPreferredMode(NULL);
ÂÂÂÂ// Allocate memory for the display in the uncached region
ÂÂÂÂxfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
ÂÂÂÂ
ÂÂÂÂ// Initialise the console, required for printf
ÂÂÂÂconsole_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
ÂÂÂÂ
ÂÂÂÂ// Set up the video registers with the chosen mode
ÂÂÂÂVIDEO_Configure(rmode);
ÂÂÂÂ
ÂÂÂÂ// Tell the video hardware where our display memory is
ÂÂÂÂVIDEO_SetNextFramebuffer(xfb);
ÂÂÂÂ
ÂÂÂÂ// Make the display visible
ÂÂÂÂVIDEO_SetBlack(FALSE);
ÂÂÂÂ// Flush the video register changes to the hardware
ÂÂÂÂVIDEO_Flush();
ÂÂÂÂ// Wait for Video setup to complete
ÂÂÂÂVIDEO_WaitVSync();
ÂÂÂÂif(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
ÂÂÂÂ// The console understands VT terminal escape codes
ÂÂÂÂ// This positions the cursor on row 2, column 0
ÂÂÂÂ// we can use variables for this with format codes too
ÂÂÂÂ// e.g. printf ("\x1b[%d;%dH", row, column );
ÂÂÂÂprintf("\x1b[2;0H");
ÂÂÂÂÂÂÂÂ
ÂÂÂÂprintf("Eject DVD 0.1 - (c) 2008 hOTzENpLOTz\n\n");
ÂÂÂÂ
ÂÂÂÂ// Check if a DVD is in the drive
ÂÂÂÂuint32_t val;
ÂÂÂÂDI_GetCoverRegister(&val);ÂÂÂÂ
ÂÂÂÂif (!(val&0x2))
ÂÂÂÂ{
ÂÂÂÂÂÂÂÂprintf("No DVD in drive.");
ÂÂÂÂ}
ÂÂÂÂelse
ÂÂÂÂ{
ÂÂÂÂÂÂÂÂprintf("Ejecting DVD... ");
ÂÂÂÂÂÂÂÂif (DI_Eject() == 0) {
ÂÂÂÂÂÂÂÂÂÂÂÂprintf("OK.");
ÂÂÂÂÂÂÂÂ} else {
ÂÂÂÂÂÂÂÂÂÂÂÂprintf("\nCould not eject DVD!");
ÂÂÂÂÂÂÂÂ}
ÂÂÂÂ}
ÂÂÂÂ
ÂÂÂÂprintf("\n\nExiting...\n");
ÂÂÂÂreturn 0;
}