mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
fs: be consistent about no stack temps in fsFs
This commit is contained in:
parent
c3b0b63471
commit
afbf2c6f71
@ -629,9 +629,6 @@ Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void *
|
|||||||
if (hosversionBefore(4,0,0))
|
if (hosversionBefore(4,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
char send_path[FS_MAX_PATH] = {0};
|
|
||||||
strncpy(send_path, path, sizeof(send_path)-1);
|
|
||||||
|
|
||||||
return _fsObjectDispatchIn(&fs->s, 15, query_id,
|
return _fsObjectDispatchIn(&fs->s, 15, query_id,
|
||||||
.buffer_attrs = {
|
.buffer_attrs = {
|
||||||
SfBufferAttr_HipcPointer | SfBufferAttr_In,
|
SfBufferAttr_HipcPointer | SfBufferAttr_In,
|
||||||
@ -639,7 +636,7 @@ Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void *
|
|||||||
SfBufferAttr_HipcMapAlias | SfBufferAttr_Out | SfBufferAttr_HipcMapTransferAllowsNonSecure,
|
SfBufferAttr_HipcMapAlias | SfBufferAttr_Out | SfBufferAttr_HipcMapTransferAllowsNonSecure,
|
||||||
},
|
},
|
||||||
.buffers = {
|
.buffers = {
|
||||||
{ send_path, sizeof(send_path) },
|
{ path, FS_MAX_PATH },
|
||||||
{ in, in_size },
|
{ in, in_size },
|
||||||
{ out, out_size },
|
{ out, out_size },
|
||||||
},
|
},
|
||||||
@ -655,7 +652,8 @@ Result fsFsIsValidSignedSystemPartitionOnSdCard(FsFileSystem* fs, bool *out) {
|
|||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
u8 tmp=0;
|
u8 tmp=0;
|
||||||
Result rc = fsFsQueryEntry(fs, &tmp, sizeof(tmp), NULL, 0, "/", FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard);
|
char send_path[FS_MAX_PATH] = "/";
|
||||||
|
Result rc = fsFsQueryEntry(fs, &tmp, sizeof(tmp), NULL, 0, send_path, FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard);
|
||||||
if (R_SUCCEEDED(rc) && out) *out = tmp & 1;
|
if (R_SUCCEEDED(rc) && out) *out = tmp & 1;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user