diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-05 08:55:19 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-05 08:55:19 -0500 |
| commit | 190de2472aca200d33dea42d3a7e839a697dd02e (patch) | |
| tree | 1cfbec9b9c2477b4cd3b160f5fdae3ba373c9189 /tools | |
| parent | d88e68dab4518017e09709a325eb6259b1154b6e (diff) | |
chore: tools: improved tooling and security in chk.hefs, and mkfs.hefs.
chore: update README.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/chk.hefs.cc | 2 | ||||
| -rwxr-xr-x | tools/mk_app.py | 4 | ||||
| -rwxr-xr-x | tools/mk_fwrk.py | 4 | ||||
| -rwxr-xr-x | tools/mk_htman.py | 1 | ||||
| -rwxr-xr-x | tools/mk_img.py | 5 | ||||
| -rw-r--r-- | tools/mkfs.hefs.cc | 2 |
6 files changed, 5 insertions, 13 deletions
diff --git a/tools/chk.hefs.cc b/tools/chk.hefs.cc index a520d231..c1c58c6e 100644 --- a/tools/chk.hefs.cc +++ b/tools/chk.hefs.cc @@ -59,7 +59,7 @@ int main(int argc, char** argv) { if (strncmp(boot_node.magic, kOpenHeFSMagic, kOpenHeFSMagicLen) != 0 || boot_node.sectorCount < 1 || boot_node.sectorSize < kMkFsSectorSz) { - mkfs::console_out() << "hefs: error: Device is not an OpenHeFS disk: " << opt_disk << "\n"; + mkfs::console_out() << "hefs: error: Device does not contain an OpenHeFS disk: " << opt_disk << "\n"; return EXIT_FAILURE; } diff --git a/tools/mk_app.py b/tools/mk_app.py index 90aa2df5..793dd4a4 100755 --- a/tools/mk_app.py +++ b/tools/mk_app.py @@ -1,9 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import json -import sys +import os, json, sys def create_directory_structure(base_path, project_name): # Define the directory structure diff --git a/tools/mk_fwrk.py b/tools/mk_fwrk.py index d47e4609..3779cd42 100755 --- a/tools/mk_fwrk.py +++ b/tools/mk_fwrk.py @@ -1,9 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import json -import sys +import os, json, sys """ Create directory structure for the framework. diff --git a/tools/mk_htman.py b/tools/mk_htman.py index e865f7c5..366cd732 100755 --- a/tools/mk_htman.py +++ b/tools/mk_htman.py @@ -28,7 +28,6 @@ if __name__ == "__main__": print(f"ERROR: Manual file '{manual_path}' is empty.") sys.exit(os.EX_DATAERR) html_content = f"<html><head><title>NeKernel Manual: {manual_path}</title></head><body><pre>{content}</pre></body></html>" - html_path = manual_path.replace('.man', '.html') with open(html_path, 'w') as html_file: diff --git a/tools/mk_img.py b/tools/mk_img.py index f0fa0609..23b94eb1 100755 --- a/tools/mk_img.py +++ b/tools/mk_img.py @@ -1,10 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import sys -import subprocess -import glob as file_glob +import os, sys, subprocess, glob as file_glob def copy_to_fat(image_path, source_dir): if not os.path.isfile(image_path): diff --git a/tools/mkfs.hefs.cc b/tools/mkfs.hefs.cc index 0f11142b..7016bf18 100644 --- a/tools/mkfs.hefs.cc +++ b/tools/mkfs.hefs.cc @@ -20,7 +20,7 @@ static std::u8string kDiskLabel; static size_t kDiskSectorSz = 512; int main(int argc, char** argv) { - if (argc < 2) { + if (argc != 10) { mkfs::console_out() << "hefs: usage: mkfs.hefs -L=<label> -s=<sector_size> -b=<ind_start> -e=<ind_end> " "-bs=<block_start> -be=<block_end> -is=<in_start> -ie=<in_end> " |
