Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
build: factor ext2 filenames
Factor them in own variables to avoid repeating them in following
commits.

This is just refactoring, no behaviour changes.
  • Loading branch information
ptoscano committed Apr 3, 2020
1 parent e38499f commit cefda78
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/mode_build.ml
Expand Up @@ -59,6 +59,10 @@ and string_of_file_content = function
| Excludefiles -> "excludefiles"
| Empty -> "empty"

let kernel_filename = "kernel"
and appliance_filename = "root"
and initrd_filename = "initrd"

let rec build debug
(copy_kernel, format, host_cpu,
packager_config, tmpdir, use_installed, size,
Expand Down Expand Up @@ -223,9 +227,9 @@ let rec build debug
Format_chroot.build_chroot debug files outputdir packagelist_file

| Ext2 ->
let kernel = outputdir // "kernel"
and appliance = outputdir // "root"
and initrd = outputdir // "initrd" in
let kernel = outputdir // kernel_filename
and appliance = outputdir // appliance_filename
and initrd = outputdir // initrd_filename in
let kernel_version, modpath =
Format_ext2_kernel.build_kernel debug host_cpu copy_kernel kernel in
Format_ext2.build_ext2 debug basedir files modpath kernel_version
Expand Down

0 comments on commit cefda78

Please sign in to comment.