| 36 | } |
| 37 | |
| 38 | Result fsInit(void) |
| 39 | { |
| 40 | Result ret = 0; |
| 41 | |
| 42 | if (AtomicPostIncrement(&fsuRefCount)) return 0; |
| 43 | |
| 44 | ret = srvGetServiceHandle(&fsuHandle, "fs:USER"); |
| 45 | if (R_SUCCEEDED(ret) && envGetHandle("fs:USER") == 0) |
| 46 | { |
| 47 | ret = FSUSER_Initialize(fsuHandle); |
| 48 | if (R_FAILED(ret)) svcCloseHandle(fsuHandle); |
| 49 | } |
| 50 | |
| 51 | if (R_FAILED(ret)) AtomicDecrement(&fsuRefCount); |
| 52 | return ret; |
| 53 | } |
| 54 | |
| 55 | void fsExit(void) |
| 56 | { |
no test coverage detected