summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
15 15
16namespace Service::SM { 16namespace Service::SM {
17 17
18constexpr ResultCode ERR_ALREADY_REGISTERED(ErrorModule::SM, 4);
19constexpr ResultCode ERR_INVALID_NAME(ErrorModule::SM, 6);
20constexpr ResultCode ERR_SERVICE_NOT_REGISTERED(ErrorModule::SM, 7);
21
18ServiceManager::ServiceManager() = default; 22ServiceManager::ServiceManager() = default;
19ServiceManager::~ServiceManager() = default; 23ServiceManager::~ServiceManager() = default;
20 24
@@ -24,10 +28,10 @@ void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) {
24 28
25static ResultCode ValidateServiceName(const std::string& name) { 29static ResultCode ValidateServiceName(const std::string& name) {
26 if (name.size() <= 0 || name.size() > 8) { 30 if (name.size() <= 0 || name.size() > 8) {
27 return ERR_INVALID_NAME_SIZE; 31 return ERR_INVALID_NAME;
28 } 32 }
29 if (name.find('\0') != std::string::npos) { 33 if (name.find('\0') != std::string::npos) {
30 return ERR_NAME_CONTAINS_NUL; 34 return ERR_INVALID_NAME;
31 } 35 }
32 return RESULT_SUCCESS; 36 return RESULT_SUCCESS;
33} 37}
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:
36 std::shared_ptr<ServiceManager> service_manager; 36 std::shared_ptr<ServiceManager> service_manager;
37}; 37};
38 38
39constexpr ResultCode ERR_SERVICE_NOT_REGISTERED(-1);
40constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(-1);
41constexpr ResultCode ERR_INVALID_NAME_SIZE(-1);
42constexpr ResultCode ERR_NAME_CONTAINS_NUL(-1);
43constexpr ResultCode ERR_ALREADY_REGISTERED(-1);
44
45class ServiceManager { 39class ServiceManager {
46public: 40public:
47 static void InstallInterfaces(std::shared_ptr<ServiceManager> self); 41 static void InstallInterfaces(std::shared_ptr<ServiceManager> self);