Commit Graph

53 Commits

Author SHA1 Message Date
Michael Scire
bbb682ea36 ncm: GetContentAccessibilities, GetContentInfo* 2022-10-12 09:15:44 -07:00
Michael Scire
6a5d2ced4b ams: globally prefer R_RETURN to return for ams::Result 2022-04-04 17:46:58 -07:00
Michael Scire
6f4618ea60 ams: use R_SUCCEED, R_THROW globally 2022-04-04 17:46:57 -07:00
Michael Scire
652828c4f3 strat: fix clang build 2022-03-23 11:25:20 -07:00
Michael Scire
797a6deaf3 ncm: hot take, uninitialized data bad 2022-03-23 09:16:03 -07:00
Michael Scire
39047de5c2 ncm: update client code to better reflect latest sysupdate 2022-03-23 09:15:56 -07:00
Michael Scire
d7a9c7ec4c ams: support building unit test programs on windows/linux/macos 2022-03-23 09:15:46 -07:00
Michael Scire
9ac47ccc1b lib: add missing semicolon 2022-03-23 09:15:40 -07:00
SciresM
00203fd7c3 Integrate new result macros. (#1780)
* result: try out some experimental shenanigans

* result: sketch out some more shenanigans

* result: see what it looks like to convert kernel to use result conds instead of guards

* make rest of kernel use experimental new macro-ing
2022-03-23 09:15:40 -07:00
Michael Scire
9436b9a555 ams: deduplicate static initialization logic 2022-01-19 16:28:54 -08:00
Léo Lam
2916512fb7 Minor header fixes to reduce parsing issues with Clang (#1700)
* Work around Clang's incomplete C++20 support for omitting typename

* vapours: fix Clang error about missing return in constexpr function

* stratosphere: fix call to non-constexpr strlen in constexpr function

strlen being constexpr is a non-compliant GCC extension; Clang
explicitly rejects it: https://reviews.llvm.org/D23692

* stratosphere: add a bunch of missing override specifiers

* stratosphere: work around Clang consteval bug

Minimal example: https://godbolt.org/z/MoM64v93M

The issue seems to be that Clang does not consider f(x) to be a
constant expression if x comes from a template argument that isn't
a non-type auto template argument (???)

We can work around this by relaxing GetMessageHeaderForCheck (by using
constexpr instead of consteval). This produces no functional changes
because the result of GetMessageHeaderForCheck() is assigned to a
constexpr variable, so the result is guaranteed to be computed
at compile-time.

* stratosphere: fix missing require clauses in definitions

GCC not requiring the require clauses to be repeated for member
definitions is actually a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96830

Clang rejects declarations with missing require clauses.

* Fix ALWAYS_INLINE_LAMBDA and parameter list relative order

While GCC doesn't seem to care about the position of the always_inline
attribute relative to the parameter list, Clang is very picky
and requires the attribute to appear after the parameter list
(and before a trailing return type)

* stratosphere: fix static constexpr member variable with incomplete type

GCC accepts this for some reason (because of the lambda?) but Clang
correctly rejects this.
2021-11-30 16:34:43 -08:00
Michael Scire
3e33fb6361 strat: use m_ for member variables 2021-10-15 23:54:35 -07:00
Michael Scire
3b5f56ab9f ams: replace most remaining operator & with std::addressof 2021-10-15 23:54:34 -07:00
Michael Scire
e2df2f98a3 strat: always use explicit result namespacing 2021-10-15 23:54:33 -07:00
Michael Scire
843dc8e521 libstrat: fix compilation without pre-compiled header/without lto 2021-10-07 23:06:28 -07:00
Michael Scire
fd1b6d4578 libstrat: enable -Wextra, -Werror
This caught an embarrassingly large number of bugs.
2021-10-07 23:06:28 -07:00
Michael Scire
002422d5dc ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-07 23:06:25 -07:00
Michael Scire
c68298a00e stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex 2021-10-07 23:06:22 -07:00
Michael Scire
dc52a32285 ncm: fix destructor availability 2021-09-19 11:01:04 -07:00
Adubbz
4afce6965f ncm: updated to 13.0.0 2021-09-19 10:35:35 -07:00
Adubbz
66104b830a ncm: skeleton new commands 2021-09-19 10:35:34 -07:00
Michael Scire
dc3f54a713 ams: std::optional -> util::optional 2021-07-12 01:59:51 -07:00
Michael Scire
888b39fa50 ams: assume gcc 11 2021-04-29 03:04:54 -07:00
Michael Scire
68ddbc732a ncm: fix iteration of nested-subdirectory content files 2021-04-12 17:13:22 -07:00
Michael Scire
7bee0289ee ncm: fix random error when deleting content 2021-04-12 17:13:22 -07:00
Michael Scire
3bcfb043f1 ncm: fix GameCardStorageRoot mount point (closes #1404) 2021-04-11 03:59:05 -07:00
Adubbz
a156728af7 ncm: Updated ListContentId for 11.0.0 2021-04-11 03:59:04 -07:00
Michael Scire
fddf313699 ams: distribute sysmodules in single file as stratosphere.romfs 2021-04-11 03:59:02 -07:00
Michael Scire
834549081a ncm: fix ContentStorageImplBase constructor 2021-02-02 18:32:59 -08:00
Michael Scire
a1504c0df4 string_view: remove now unecessary comment 2021-02-02 12:16:22 -08:00
Michael Scire
29b3baf678 util::string_view, update pgl for new sf semantics 2021-02-02 12:16:21 -08:00
Michael Scire
637c44f64d libstrat: convert to experimental new (super-accurate) sf allocation semantics 2021-02-02 12:16:20 -08:00
Michael Scire
26369e34f1 ams: use util::SNPrintf over std:: (size/linker improvements) 2021-01-13 10:41:28 -08:00
Michael Scire
e44d2a211c ncm: fix abort in ListContentMetaInfo 2020-12-02 06:53:04 -08:00
Michael Scire
103c81abc5 ncm: safer access patterns for FirmwareVariationInfo 2020-08-01 15:31:00 -07:00
Michael Scire
9f8f932383 ncm: loosen FirmwareVariation restrictions. 2020-08-01 15:30:59 -07:00
Michael Scire
ffc68d133f ncm: rights ids were added in 2.0.0 2020-08-01 15:30:58 -07:00
Michael Scire
771de71f0c ncm: make *ActivateContentMetaDatabase play nice with 1.0.0 2020-08-01 15:30:56 -07:00
SciresM
ecf8389efd sf: Change interface definition methodology (#1074)
* sf: Begin experimenting with new interface declaration format

* sf: convert fs interfaces to new format

* sf: finish conversion of libstrat to new definitions

* sf: convert loader to new format

* sf: convert spl to new format

* sf: update ncm for new format

* sf: convert pm to new format

* sf: convert ro/sm to new format

* sf: update fatal for new format

* sf: support building dmnt under new scheme

* sf: update ams.mitm for new format

* sf: correct invocation def for pointer holder

* fs: correct 10.x+ user bindings for Get*SpaceSize
2020-08-01 15:30:56 -07:00
Michael Scire
3c7c4d8bff fs: implement AccessLog, enable for File operations 2020-08-01 15:30:55 -07:00
Michael Scire
52088109b7 libstrat: correct firmware comparison in meta database builder 2020-08-01 15:30:53 -07:00
Michael Scire
8f0ee258ac sysupdater: begin implementing api 2020-06-28 19:41:09 -07:00
Adubbz
8ab659c131 ncm: fix exfat system updates 2020-06-28 19:41:08 -07:00
Adubbz
797dfa782e ncm: implement firmware downgrading (#958)
* ncm: implement firmware downgrading

* ncm: make storage list const
2020-05-18 08:22:12 -07:00
SciresM
b38939adb5 Implement support for parsing/interacting with NCAs. (#942)
* fs: implement support for interacting with ncas.

* spl: extend to use virtual keyslots
2020-05-12 15:44:19 -07:00
SciresM
7d041e853d Switch atmosphere's build target to C++20. (#952)
* ams: update to build with gcc10/c++20

* remove mno-outline-atomics

* ams: take care of most TODO C++20s

* fusee/sept: update for gcc10

* whoosh, your code now uses pre-compiled headers

* make: dependency fixes
2020-05-12 15:44:19 -07:00
Adubbz
345499c71e ncm: update to 10.0.0 (#879) 2020-04-15 11:55:06 -07:00
Michael Scire
c190d46343 hos::Version: rename enum members 2020-04-15 11:55:01 -07:00
Michael Scire
a0cddf7c06 os: refactor/rewrite entire namespace. 2020-04-15 11:54:59 -07:00
Adubbz
6e8ea3aafd NCM client implementation (#858)
* ncm: Implement InstallTaskDataBase and FileInstallTaskData

* ncm: minor bugfixes

* ncm: Implemented MemoryInstallTaskData

* ncm: more std

* ncm: begin implementing install task base

* ncm: move protected funcs

* ncm: fix recursive include

* ncm: more install task progress

* ncm install task: implement IncrementProgress and update UpdateThroughputMeasurement

* ncm: more work

* ncm client: more progress

* ncm client: more progress

* ncm client: finish implementing GetContentMetaInfoList

* ncm client: more progress

* ncm client: finished InstallTaskBase

* ncm client: implement PackageInstallTaskBase

* ncm client: fixes

* ncm: improve accuracy

* ncm client: implement PackageInstallTask

* ncm client: implement PackageSystemUpdateTask

* ncm client: minor name tweaks

* ncm client: implement SubmissionPackageInstallTask

* ncm client: add missing this to SubmissionPackageInstallTask

* ncm client: add missing nullptr check to SubmissionPackageInstallTask destructor

* ncm client: SubmissionPackageInstallTask fixes

* ncm: fix forward declarations

* ncm client: added simplified funcs

* ncm: cleanup client code

* ncm: fix bug introduced by cleanup

* ncm: fix typo

* ncm: implement correct ReadVariationContentMetaInfoList behavior

* ncm: correct InstallContentMetaWriter ctor

* ncm: correct conversion of content meta header types

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-04-05 23:25:44 -07:00