diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/logging/backend.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/log.h | 1 | ||||
| -rw-r--r-- | src/common/string_util.cpp | 4 | ||||
| -rw-r--r-- | src/common/string_util.h | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 3e31a74f2..c26b20062 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -41,6 +41,7 @@ namespace Log { | |||
| 41 | SUB(Service, FS) \ | 41 | SUB(Service, FS) \ |
| 42 | SUB(Service, HID) \ | 42 | SUB(Service, HID) \ |
| 43 | SUB(Service, LM) \ | 43 | SUB(Service, LM) \ |
| 44 | SUB(Service, MM) \ | ||
| 44 | SUB(Service, NFP) \ | 45 | SUB(Service, NFP) \ |
| 45 | SUB(Service, NIFM) \ | 46 | SUB(Service, NIFM) \ |
| 46 | SUB(Service, NS) \ | 47 | SUB(Service, NS) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 43e572ebe..c5015531c 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -61,6 +61,7 @@ enum class Class : ClassType { | |||
| 61 | Service_FS, ///< The FS (Filesystem) service | 61 | Service_FS, ///< The FS (Filesystem) service |
| 62 | Service_HID, ///< The HID (Human interface device) service | 62 | Service_HID, ///< The HID (Human interface device) service |
| 63 | Service_LM, ///< The LM (Logger) service | 63 | Service_LM, ///< The LM (Logger) service |
| 64 | Service_MM, ///< The MM (Multimedia) service | ||
| 64 | Service_NFP, ///< The NFP service | 65 | Service_NFP, ///< The NFP service |
| 65 | Service_NIFM, ///< The NIFM (Network interface) service | 66 | Service_NIFM, ///< The NIFM (Network interface) service |
| 66 | Service_NS, ///< The NS services | 67 | Service_NS, ///< The NS services |
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 1d952874d..646400db0 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -64,6 +64,10 @@ std::string ArrayToString(const u8* data, size_t size, int line_len, bool spaces | |||
| 64 | return oss.str(); | 64 | return oss.str(); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | std::string StringFromBuffer(const std::vector<u8>& data) { | ||
| 68 | return std::string(data.begin(), std::find(data.begin(), data.end(), '\0')); | ||
| 69 | } | ||
| 70 | |||
| 67 | // Turns " hej " into "hej". Also handles tabs. | 71 | // Turns " hej " into "hej". Also handles tabs. |
| 68 | std::string StripSpaces(const std::string& str) { | 72 | std::string StripSpaces(const std::string& str) { |
| 69 | const size_t s = str.find_first_not_of(" \t\r\n"); | 73 | const size_t s = str.find_first_not_of(" \t\r\n"); |
diff --git a/src/common/string_util.h b/src/common/string_util.h index 65e4ea5d3..1f5a383cb 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -21,6 +21,8 @@ std::string ToUpper(std::string str); | |||
| 21 | 21 | ||
| 22 | std::string ArrayToString(const u8* data, size_t size, int line_len = 20, bool spaces = true); | 22 | std::string ArrayToString(const u8* data, size_t size, int line_len = 20, bool spaces = true); |
| 23 | 23 | ||
| 24 | std::string StringFromBuffer(const std::vector<u8>& data); | ||
| 25 | |||
| 24 | std::string StripSpaces(const std::string& s); | 26 | std::string StripSpaces(const std::string& s); |
| 25 | std::string StripQuotes(const std::string& s); | 27 | std::string StripQuotes(const std::string& s); |
| 26 | 28 | ||