Hello again. I'm having another interesting error since we moved our game to
an in-house server. Any system calls we make (pfile backup, etc) are all
failing with a error of -1. Does anyone have any idea why this would be
happening? Could it have anything to do with the different GCC version? The
new server is running GCC 4.1.1 and everything seems to compile fine, but I
don't know if there's options that are disabled or what the problem is. Any
guidance would be appreciated.

-Valnir

/* code block */
bool pfile_backup ( void )
{
    char cmd[MSL];
    int i, errLevel;

    for ( i = 0; i < 4; i++ )
    {
        switch ( i )
        {
            case 0:
                sprintf( cmd, "mv -uf %s*.gz %s", BACKUP_DIR, BACKOLD_DIR );
                break;
            case 1:
                sprintf( cmd, "rm -f %s*", BACKUP_DIR );
                break;
            case 2:
                sprintf( cmd, "cp -ufp %s* %s", PLAYER_DIR, BACKUP_DIR );
                break;
            case 3:
                sprintf( cmd, "gzip %s*", BACKUP_DIR );
                break;
        }

        if ( ( errLevel = system( cmd ) ) != 0 )
        {
            char buf[MSL];

            bug( "NON-ZERO returned. Please check log for errors.", 0 );
            wiznet("ERROR: System returned an error during pfile backup.",
                NULL,NULL,WIZ_SECURE,0,CREATOR);
            sprintf( buf, "ERROR: Failure occured at \"%s\" with error %d",
                cmd, errLevel );
            wiznet(buf,NULL,NULL,WIZ_SECURE,0,CREATOR);
            return FALSE;
        }
    }

    return TRUE;
}

/* Game Output */
47665/47665hp 21571/21571m [-332]     8019 > pback
Backing up files now...
WizNET: [9:04] ERROR: System returned an error during pfile backup.
WizNET: [9:04] ERROR: Failure occured at "mv -uf
../../backup/v5.1/player/*.gz ../../backup/v5.1/player_old/" with error -1
Backup failed!!


-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to