MCPcopy Create free account
hub / github.com/devkitPro/libctru / archive_close

Function archive_close

libctru/source/archive_dev.c:597–612  ·  view source on GitHub ↗

! Close an open file * * @param[in,out] r newlib reentrancy struct * @param[in] fd Pointer to archive_file_t * * @returns 0 for success * @returns -1 for error */

Source from the content-addressed store, hash-verified

595 * @returns -1 for error
596 */
597static int
598archive_close(struct _reent *r,
599 void *fd)
600{
601 Result rc;
602
603 /* get pointer to our data */
604 archive_file_t *file = (archive_file_t*)fd;
605
606 rc = FSFILE_Close(file->fd);
607 if(R_SUCCEEDED(rc))
608 return 0;
609
610 r->_errno = archive_translate_error(rc);
611 return -1;
612}
613
614/*! Write to an open file
615 *

Callers

nothing calls this directly

Calls 2

FSFILE_CloseFunction · 0.85
archive_translate_errorFunction · 0.85

Tested by

no test coverage detected