• R/O
  • SSH
  • HTTPS

gpsp-kai: Commit


Commit MetaInfo

Revision564 (tree)
Zeit2010-03-04 10:42:15
Autortakka

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/iso_tool/menu.c (revision 563)
+++ trunk/iso_tool/menu.c (revision 564)
@@ -41,12 +41,10 @@
4141 int iso_patch(char *dir, char *file, file_type type, int opt_1, int opt_2);
4242 int file_update(char *dir, char *file, file_type type, int opt_1, int opt_2);
4343 int soft_reboot(char *dir, char *file, file_type type, int opt_1, int opt_2);
44-int osk_test(char *dir, char *file, file_type type, int opt_1, int opt_2);
4544
4645 int file_trans(char* out_path, char *in_path, trans_type type, int level, int limit, int opt_1, int opt_2);
4746
4847 menu_item menu_sys[] = {
49- { MENU_COMMAND, "OSK", (osk_test), NULL, 0, 0 },
5048 { MENU_COMMAND, "UMD_ID.TXT更新", (file_update), NULL, (int)"UMD_ID.TXT", 0 },
5149 { MENU_COMMAND, "iso_tool更新", (file_update), NULL, (int)"EBOOT.PBP", 1 },
5250 { MENU_NOP, "--------------", (NULL), NULL, 0, 0 },
@@ -154,16 +152,6 @@
154152 }
155153
156154 /*---------------------------------------------------------------------------
157- NOP
158----------------------------------------------------------------------------*/
159-int osk_test(char *dir, char *file, file_type type, int opt_1, int opt_2)
160-{
161- char test[256];
162- osk(test, "INPUT", "FILED", 0);
163- return 0;
164-}
165-
166-/*---------------------------------------------------------------------------
167155 EBOOT_BINの変換
168156 ---------------------------------------------------------------------------*/
169157 int eboot_exchange(char *dir, char *file, file_type type, int opt_1, int opt_2)
@@ -191,6 +179,11 @@
191179
192180 // EBOOT.BIN読込み
193181 i_size = eboot_read(&WORK[I_BUFFER][0], EBOOT_MAX_SIZE, path, type);
182+ if(i_size < 0)
183+ {
184+ err_msg(i_size);
185+ return DONE;
186+ }
194187
195188 // バックアップ
196189 // 複合済みか判定
@@ -205,7 +198,12 @@
205198 strcat(ebt_path, global.umd_id);
206199 strcat(ebt_path, ".EBT");
207200
208- ms_write(&WORK[I_BUFFER][0], ebt_path, 0, i_size);
201+ ret = ms_write(&WORK[I_BUFFER][0], ebt_path, 0, i_size);
202+ if(ret < 0)
203+ {
204+ err_msg(ret);
205+ return DONE;
206+ }
209207 }
210208 }
211209
@@ -221,11 +219,10 @@
221219 // 複合化
222220 msg_win("EBOOT.BINを復号しています", 1, MSG_WAIT, 1);
223221 o_size = pspDecryptPRX((u8 *)&WORK[I_BUFFER][0], (u8 *)&WORK[O_BUFFER][0], i_size);
224- if((o_size <= 0) || (strncmp(&WORK[O_BUFFER][1], "ELF", 3) != 0))
222+ if((o_size < 0) || (strncmp(&WORK[O_BUFFER][1], "ELF", 3) != 0))
225223 {
226- // MENU_XY(240, MSG_LINE, (s8*)CLEAR_LINE, 1);
227- // MENU_XY(240, MSG_LINE, (s8*)DECRYPT_ERROR, 1);
228- return 0;
224+ err_msg(o_size);
225+ return DONE;
229226 }
230227 mod_flag = 1;
231228 }
@@ -262,8 +259,18 @@
262259 if(mod_flag == 1)
263260 {
264261 msg_win("EBOOT.BINを書き込んでいます", 1, MSG_WAIT, 1);
265- set_file_mode(path, FIO_S_IWUSR | FIO_S_IWGRP | FIO_S_IWOTH);
266- eboot_write(&WORK[O_BUFFER][0], o_size, path, type);
262+ ret = set_file_mode(path, FIO_S_IWUSR | FIO_S_IWGRP | FIO_S_IWOTH);
263+ if(ret < 0)
264+ {
265+ err_msg(ret);
266+ return DONE;
267+ }
268+ ret = eboot_write(&WORK[O_BUFFER][0], o_size, path, type);
269+ if(ret < 0)
270+ {
271+ err_msg(ret);
272+ return DONE;
273+ }
267274 }
268275
269276 msg_win("終了しました", 1, MSG_WAIT, 6);
Show on old repository browser