diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-17 09:19:52 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-17 09:19:52 +0100 |
| commit | 0d931fe17b32cc5082f1180138dbb7bd6416dd14 (patch) | |
| tree | 2c5b2f6176423cf53d419fd2e6d5131d2bbb224f /tools/libmkfs | |
| parent | bfce4d5673fc469395e0d438daa7f6d839834abc (diff) | |
tools: feat: new syntax for function.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tools/libmkfs')
| -rw-r--r-- | tools/libmkfs/mkfs.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/libmkfs/mkfs.h b/tools/libmkfs/mkfs.h index 6e242293..18ed571b 100644 --- a/tools/libmkfs/mkfs.h +++ b/tools/libmkfs/mkfs.h @@ -8,7 +8,6 @@ #include <tools/rang.h> #include <iostream> -#include <sstream> #include <string> #define kMkFsSectorSz (512U) @@ -63,10 +62,10 @@ namespace detail { template <typename CharType> inline std::basic_string<CharType> get_option(const std::basic_string<CharType>& args, const std::basic_string<CharType>& option) { - size_t pos = args.find(option + CharType('=')); + size_t pos = args.find(CharType('-') + option + CharType('=')); if (pos != std::string::npos) { - size_t start = pos + option.length() + 1; + size_t start = pos + option.length() + 2; size_t end = args.find(' ', start); return args.substr(start, end - start); } |
