Dave Murphy
77c2d18046
add missing separator to local path
2023-05-07 18:09:12 +02:00
fincs
076657fd31
Allow user override of dynamic memory allocation functions throughout libnx
2021-01-22 18:37:46 +01:00
Michael Scire
e5ae43f4c2
results: use R_VALUE for comparisons
2020-12-01 02:26:26 +01:00
Ezekiel Bethel
573e2f772c
add lstat to fs_dev and romfs_dev
2020-05-26 17:32:54 +02:00
yellows8
c82c8b8760
fs/fs_dev: Added fsOpenReadOnlySaveDataFileSystem and fsOpen_SaveDataReadOnly/fsdevMountSaveDataReadOnly. Minor adjustments.
2020-04-03 19:58:40 -04:00
yellows8
fa52f9b046
fs/fs_dev: Added fsOpen_TemporaryStorage/fsOpen_CacheStorage and fsdevMountTemporaryStorage/fsdevMountCacheStorage. Minor adjustments.
2020-04-03 19:16:26 -04:00
yellows8
918fe2b4d6
fs/fs_dev: Added fsOpen_BcatSaveData/fsOpen_SystemBcatSaveData and fsdevMountBcatSaveData/fsdevMountSystemBcatSaveData.
2020-04-03 11:04:05 -04:00
yellows8
f0f21507db
fs/fsdev: Added fsdevMountDeviceSaveData/fsOpen_DeviceSaveData, and minor other adjustments.
2020-03-18 22:33:15 -04:00
yellows8
5182b57a1d
fs/fs_dev: Added FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard, fsFsIsValidSignedSystemPartitionOnSdCard, and fsdevIsValidSignedSystemPartitionOnSdCard. Improved docs.
2019-11-28 18:51:52 -05:00
yellows8
8fe48e8eac
fs/fs_dev/romfs_dev: Updated various types to use s64. Removed the inval param from fsDirRead since it doesn't exist. Renamed fileSize in FsDirectoryEntry to file_size and updated the type. Renamed FsFileSystemQueryType to FsFileSystemQueryId, and renamed FsFileSystemQueryType_SetArchiveBit to FsFileSystemQueryId_SetConcatenationFileAttribute. Renamed fsFsSetArchiveBit to fsFsSetConcatenationFileAttribute. Renamed fsdevSetArchiveBit to fsdevSetConcatenationFileAttribute. Minor other changes.
2019-11-28 14:58:55 -05:00
yellows8
f181807215
fs/fs_dev: Updated names to match wiki. Updated param names. Renamed FS_SAVEDATA_CURRENT_PROGRAMID to FS_SAVEDATA_CURRENT_APPLICATIONID. Updated field names in FsSaveDataAttribute, FsSaveDataExtraData, FsSaveDataCreationInfo, and FsSaveDataInfo. Updated names for the enum values for FsSaveDataSpaceId, FsSaveDataType, FsSaveDataFlags, and FsGameCardAttribute. Added FsSaveDataSpaceId_SdUser and FsSaveDataSpaceId_SafeMode. Added FsSaveDataType_SystemBcat. Added FsSaveDataRank. Fixed the name for FsGameCardPartition and added FsGameCardPartition_Logo. Renamed FsBisStorageId to FsBisPartitionId, updated the enum value names for it, and added FsBisPartitionId_SignedSystemPartitionOnSafeMode. Improved docs / minor other changes.
2019-11-16 16:07:10 -05:00
yellows8
c40f8ecac6
Removed includes which are unneeded due to being included elsewhere, etc. Minor improvements.
2019-11-12 12:45:58 -05:00
yellows8
4ab50e3752
Use official naming instead of 'title(ID)'. Use 'uid(s)' instead of 'userID(s)'. Updated various struct field names. Improved docs + minor other improvements.
2019-10-30 10:38:05 -04:00
fincs
9e83f82a62
Enhance fsOpen_SystemSaveData/fsdevMountSystemSaveData
2019-10-21 21:15:40 +02:00
fincs
47b0403333
Pass plain AccountUid inputs by value instead of by non-const pointer
2019-10-21 16:57:01 +02:00
fincs
13fbde91b0
fsdev: Added fsdevMountSaveData/SystemSaveData wrappers
2019-10-21 12:38:18 +02:00
fincs
54f6fa5420
fs: Use official method names, document min sysver, correct a few parameters
2019-10-21 12:37:38 +02:00
fincs
c77b88d868
Major cleanup and refactor of fsdev and romfsdev, see details:
...
fsdev:
- Removed fsdevGetDefaultFileSystem and default-fs handling
- Refactored CWD support to have (dynamically allocated) per-device CWDs
(CWD support as a whole can be turned off with __nx_fsdev_support_cwd)
- Optimized calls by passing pointer to device through r->deviceData
- Use the per-thread path buffer directly as the argument to FS functions
- Removed redundant cross-device check in fsdev_rename
- Fixed string comparison logic in fsdevFindDevice
- fsdev_fixpath now accepts an input device in order to skip device
lookup (extensively used along with r->deviceData)
- Mounting a filesystem now automatically sets the default device
if there wasn't any previous default device (or if it's stdnull)
- fsdevMountSdmc no longer sets cwd to the folder containing the
executable - this logic was moved to a new internal function
called on startup by default (and it is now disabled for NSOs)
- Other miscellaneous optimizations
romfsdev:
- Cleaned up romfsMount* functions, removed unused/unnecessary logic
- Changed romfsMount* functions to return real result codes
- Renamed romfsMount to romfsMountSelf and improved documentation
- Removed romfsInitFromFile and romfsInitFromStorage (use Mount instead)
- Added documentation for romfsInit and romfsExit
2019-10-20 22:22:04 +02:00
fincs
26a0ee4af3
fsdev/romfsdev: Reduce TLS usage by sharing the path buffer
2019-10-20 02:48:04 +02:00
fincs
69a63bbee8
fsdev: Reduce TLS footprint for rarely used codepaths
2019-10-19 04:00:50 +02:00
fincs
3c610fb2cb
fsdev: Allow directory entry cache size to be configured dynamically
2019-10-18 21:23:11 +02:00
fincs
b30b567228
fsdev: Convert time into proper POSIX UTC timestamps (FS reports local time instead)
2019-09-22 18:14:10 +02:00
fincs
ecbc77840e
fs: Update names of enum/flag types for style consistency and correctness
2019-09-21 19:54:21 +02:00
fincs
77888f8b1f
fs: Use new IPC interface + fixes, see details:
...
- Argument types corrected to better reflect their actual types
(mostly several incorrect instances of size_t were changed to u64)
- Const correctness fixes
- fsEventNotifierGetEventHandle changed to output an Event (with
user configurable autoclear) instead of a raw Handle
2019-09-21 16:27:15 +02:00
Michael Scire
ac9d76f373
fs: fix file/storage API, add fsdevCreateFile, add fsOpenFileSystemWithPatch.
2019-06-03 14:48:45 -04:00
SciresM
e114a361be
fsdev: add way of getting last returned result. ( #276 )
...
Adds fsdevGetLastResult, which returns a thread local Result updated by every call to fsdev_translate_error.
Also changes fsdev_translate_error to return EIO instead of raw results, when not translatable.
2019-05-08 16:44:17 +02:00
Adubbz
1d3e208807
Added fsdevDeleteDirectoryRecursively
2019-05-05 18:26:08 +02:00
Ezekiel Bethel
26458fc1e8
add 0x402 (path exists) => EEXIST mapping in fs_dev
2019-04-09 22:16:34 -04:00
yellows8
fd9e02b271
Added romfsMountFromFsdev and fsdevTranslatePath. Internal romfs_dev improvements.
2019-03-29 19:49:08 -04:00
Michael Scire
5575966d0c
fix fsdev bug
2019-03-25 00:02:18 +01:00
yellows8
36bed9f8fc
Added support for getting file timestamps via 3.0.0+ fsFsGetFileTimeStampRaw, *stat() timestamps are now set when fsFsGetFileTimeStampRaw is successful. This is now used in fsdev_open() for supporting fstat. The sysver is now checked in fsFsCleanDirectoryRecursively(). Closes #204 .
2018-11-20 14:22:19 -05:00
SciresM
e19765445d
fs: Add fsFsQueryEntry (and fsFsSetArchiveBit helper) ( #202 )
...
* fs: Add fsFsSetArchiveBit
* Add fsdevSetArchiveBit wrapper
2018-11-09 22:03:47 -05:00
yellows8
52686826d1
Added fsdevGetDeviceFileSystem().
2018-10-12 22:13:14 -04:00
Dave Murphy
aa3c35e6e3
adjust fsdev_fixpath for cwd changes ( #132 )
...
* adjust fsdev_fixpath for cwd changes
2018-07-19 11:31:51 -04:00
Dave Murphy
e648524fa5
fix stringop-truncation warnings ( #84 )
...
avoid gcc 8.1.0 diagnostics as per https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wstringop-truncation
2018-05-08 21:58:38 +02:00
fincs
e001318c42
Fix strncat vulnerabilities in fs_dev.c [reported by @TuxSH]
2018-05-02 16:09:11 +02:00
fincs
2818c99dea
Revise fsdev initialization, see details:
...
- Removed fsdevInit/Exit
- Now automatically initializing fsdev state on first mount
- Added fsdevMountSdmc (replaces fsdevInit)
- Added fsdevUnmountAll (replaces fsdevExit)
2018-05-01 19:06:14 +02:00
yellows8
4c1b09d6b9
Check for invalid handle in fs*Close(). Added fsOpenDataStorageByCurrentProcess(), fsStorageRead(), and fsStorageClose(). Added fsdevGetDefaultFileSystem(). Imported nro.h from nx-hbmenu. Implemented proper RomFS support.
2018-02-23 22:29:43 -05:00
plutoo
6fa8370bfb
This looks better
2018-01-22 20:11:55 +01:00
TuxSH
5abc4873d8
Include only what is really necessary...
...
add pragma once in every header, etc.
2018-01-22 18:42:57 +01:00
plutoo
e54bbc54ea
Fix codestyle for results
2018-01-21 18:40:23 +01:00
plutoo
cac3f735af
Renamed misleading dir names "devices/" and "system/" to "runtime/"
2018-01-06 13:45:37 +01:00