TwlIPL/build/systemMenu_tools/SystemUpdaterRegionSelect/ARM9.TWL/src/process_write_cert.c
kamikawa 2b29416930 SystemMenuUpdaterとして全ての機能が実装完了。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2576 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2008-10-02 12:44:22 +00:00

87 lines
2.6 KiB
C

/*---------------------------------------------------------------------------*
Project: SystemUpdater
File: process_write_cert.c
Copyright 2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#include <twl.h>
#include "font.h"
#include "graphics.h"
#include "keypad.h"
#include "debugger_hw_reset_control.h"
#include "debugger_card_rom.h"
#include "kami_global.h"
#include "kami_copy_file.h"
#include "kami_font.h"
/*---------------------------------------------------------------------------*
型定義
*---------------------------------------------------------------------------*/
typedef struct _CopyFileList
{
char* srcPath;
char* dstPath;
} CopyFileList;
/*---------------------------------------------------------------------------*
グローバル変数定義
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
内部定数定義
*---------------------------------------------------------------------------*/
static const CopyFileList sCertList =
{
"rom:/local/cert.sys", "nand:/sys/cert.sys"
};
/*---------------------------------------------------------------------------*
内部変数定義
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
内部関数定義
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*
Name: ProcessWriteCert
Description:
Arguments: なし。
Returns: なし。
*---------------------------------------------------------------------------*/
BOOL ProcessWriteCert(void)
{
BOOL ret;
ret = kamiCopyFile(sCertList.srcPath, sCertList.dstPath);
if (ret)
{
kamiFontPrintfConsole(FONT_COLOR_GREEN, "Write Data2 Success.\n");
}
else
{
kamiFontPrintfConsole(FONT_COLOR_RED, "Write Data2 Failure!\n");
}
OS_WaitVBlankIntr();
kamiFontLoadScreenData();
return ret;
}