| 53 | } |
| 54 | |
| 55 | Result WriteTargetOutput(const TargetOutput &target_opt) { |
| 56 | UL_RC_TRY(appletInitialize()); |
| 57 | util::OnScopeExit applet_exit([]() { |
| 58 | appletExit(); |
| 59 | }); |
| 60 | |
| 61 | if(SelfIsApplet()) { |
| 62 | AppletStorage target_opt_st; |
| 63 | UL_RC_TRY(appletCreateStorage(&target_opt_st, sizeof(target_opt))); |
| 64 | UL_RC_TRY(appletStorageWrite(&target_opt_st, 0, std::addressof(target_opt), sizeof(target_opt))); |
| 65 | |
| 66 | UL_RC_TRY(appletPushOutData(&target_opt_st)); |
| 67 | } |
| 68 | else { |
| 69 | return ResultInvalidProcessType; |
| 70 | } |
| 71 | |
| 72 | return ResultSuccess; |
| 73 | } |
| 74 | |
| 75 | } |
no test coverage detected