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

Function _archiveUnmountDeviceStruct

libctru/source/archive_dev.c:426–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426Result _archiveUnmountDeviceStruct(archive_fsdevice *device)
427{
428 char name[34];
429 if(!device->setup)
430 return 0;
431
432 memset(name, 0, sizeof(name));
433 strncpy(name, device->name, sizeof(name)-2);
434 strncat(name, ":", sizeof(name)-strlen(name)-1);
435
436 RemoveDevice(name);
437 free(device->cwd);
438 FSUSER_CloseArchive(device->archive);
439 fsUnexemptFromSession(device->archive);
440
441 if(device->id == archive_device_cwd)
442 archive_device_cwd = -1;
443
444 device->setup = 0;
445 memset(device->name, 0, sizeof(device->name));
446
447 return 0;
448}
449
450Result archiveUnmount(const char *deviceName)
451{

Callers 2

archiveUnmountFunction · 0.85
archiveUnmountAllFunction · 0.85

Calls 2

FSUSER_CloseArchiveFunction · 0.85
fsUnexemptFromSessionFunction · 0.85

Tested by

no test coverage detected