summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-17 18:27:01 +0200
committerGitHub <noreply@github.com>2018-09-17 18:27:01 +0200
commitfc46183e0352e19056a722ad9901b4d3b6ec091e (patch)
treec49567fd2d4b6331bc3e4575584fd63324332da2 /src/core/hle
parentMerge pull request #1321 from lioncash/audio-shadow (diff)
parentservices/sm: Amend error code constants (diff)
downloadyuzu-fc46183e0352e19056a722ad9901b4d3b6ec091e.tar
yuzu-fc46183e0352e19056a722ad9901b4d3b6ec091e.tar.gz
yuzu-fc46183e0352e19056a722ad9901b4d3b6ec091e.tar.bz2
yuzu-fc46183e0352e19056a722ad9901b4d3b6ec091e.tar.lz
yuzu-fc46183e0352e19056a722ad9901b4d3b6ec091e.tar.xz
yuzu-fc46183e0352e19056a722ad9901b4d3b6ec091e.tar.zst
yuzu-fc46183e0352e19056a722ad9901b4d3b6ec091e.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/sm/sm.cpp8
-rw-r--r--src/core/hle/service/sm/sm.h6
2 files changed, 6 insertions, 8 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp
index 18d1641b8..096f0fd52 100644
--- a/src/core/hle/service/sm/sm.cpp
+++ b/src/core/hle/service/sm/sm.cpp
@@ -15,6 +15,10 @@
namespace Service::SM {
+constexpr ResultCode ERR_ALREADY_REGISTERED(ErrorModule::SM, 4);
+constexpr ResultCode ERR_INVALID_NAME(ErrorModule::SM, 6);
+constexpr ResultCode ERR_SERVICE_NOT_REGISTERED(ErrorModule::SM, 7);
+
ServiceManager::ServiceManager() = default;
ServiceManager::~ServiceManager() = default;
@@ -24,10 +28,10 @@ void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) {
static ResultCode ValidateServiceName(const std::string& name) {
if (name.size() <= 0 || name.size() > 8) {
- return ERR_INVALID_NAME_SIZE;
+ return ERR_INVALID_NAME;
}
if (name.find('\0') != std::string::npos) {
- return ERR_NAME_CONTAINS_NUL;
+ return ERR_INVALID_NAME;
}
return RESULT_SUCCESS;
}
diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h
index a58d922a0..da2c51082 100644
--- a/src/core/hle/service/sm/sm.h
+++ b/src/core/hle/service/sm/sm.h
@@ -36,12 +36,6 @@ private:
std::shared_ptr<ServiceManager> service_manager;
};
-constexpr ResultCode ERR_SERVICE_NOT_REGISTERED(-1);
-constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(-1);
-constexpr ResultCode ERR_INVALID_NAME_SIZE(-1);
-constexpr ResultCode ERR_NAME_CONTAINS_NUL(-1);
-constexpr ResultCode ERR_ALREADY_REGISTERED(-1);
-
class ServiceManager {
public:
static void InstallInterfaces(std::shared_ptr<ServiceManager> self);