summaryrefslogtreecommitdiffhomepage
path: root/tools/libmkfs
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-08-09 20:01:15 +0200
committerAmlal <amlal@nekernel.org>2025-08-09 20:01:15 +0200
commit7ada9006860084ba5d72b517649d1b2d51e4484a (patch)
treefab8839ea2d44ac3a3187f6e043e30f512681274 /tools/libmkfs
parent408be791647c015c99963cc1b6d710f58d729dec (diff)
feat: warning fixes and Semaphore API patches.
what: - The Semaphore API is being preppared for v0.0.4 Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'tools/libmkfs')
-rw-r--r--tools/libmkfs/mkfs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libmkfs/mkfs.h b/tools/libmkfs/mkfs.h
index e729c29b..6e242293 100644
--- a/tools/libmkfs/mkfs.h
+++ b/tools/libmkfs/mkfs.h
@@ -7,8 +7,8 @@
#pragma once
#include <tools/rang.h>
-#include <sstream>
#include <iostream>
+#include <sstream>
#include <string>
#define kMkFsSectorSz (512U)
@@ -35,13 +35,13 @@ namespace detail {
inline bool parse_signed(const std::string& opt, long& out, int base = 10) {
out = 0L;
-
+
if (opt.empty()) return true;
char* endptr = nullptr;
long val = std::strtol(opt.c_str(), &endptr, base);
- auto err = errno;
-
+ auto err = errno;
+
if (err == ERANGE || err == EINVAL) return false;
if (endptr == opt.c_str() || *endptr != '\0') return false;