Displaying 3 results from an estimated 3 matches for "bad_mode".
2016 Feb 18
0
[PATCH 3/3] Add and use an helper error function
...xt2" -> format := Some Ext2
- | s ->
- eprintf "supermin: unknown --format option (%s)\n" s;
- exit 1
+ | s -> error "unknown --format option (%s)\n" s
in
let rec set_prepare_mode () =
@@ -116,20 +112,19 @@ let main () =
bad_mode ();
mode := Some Build
and bad_mode () =
- eprintf "supermin: you must use --prepare or --build to select the mode\n";
- exit 1
+ error "you must use --prepare or --build to select the mode"
in
let set_size arg = size := Some (parse_size ar...
2016 Feb 18
4
[PATCH 0/3] supermin: miscellaneous cleanups
Hi,
few cleanups in the supermin codebase; no actual functional change.
Thanks,
--
Pino Toscano (3):
ext2: simplify tracking of visited modules
utils: remove unused run_python function
Add and use an helper error function
src/build.ml | 20 +++++-----------
src/dpkg.ml | 4 +---
src/ext2_initrd.ml | 10 ++++----
src/kernel.ml | 27
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...=
- let insert_dir, dir_seen =
- let h = Hashtbl.create (List.length files) in
- let insert_dir dir = Hashtbl.replace h dir true in
- let dir_seen dir = Hashtbl.mem h dir in
- insert_dir, dir_seen
+ let rec set_prepare_mode () =
+ if !mode <> None then
+ bad_mode ();
+ mode := Some Prepare
+ and set_build_mode () =
+ if !mode <> None then
+ bad_mode ();
+ mode := Some Build
+ and bad_mode () =
+ eprintf "supermin: you must use --prepare or --build to select the mode\n";
+ exit 1
in
- let files =...