Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4e8bcd7

Browse files
committedJan 5, 2023
Expose support for changing kernel, and adding arbitrary files
1 parent 154dbab commit 4e8bcd7

File tree

2 files changed

+2
-46
lines changed

2 files changed

+2
-46
lines changed
 

‎src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use tempfile::NamedTempFile;
1414
mod fat;
1515
mod gpt;
1616
mod mbr;
17-
mod pxe;
1817

1918
const KERNEL_FILE_NAME: &str = "kernel-x86_64";
2019
const RAMDISK_FILE_NAME: &str = "ramdisk";
@@ -52,14 +51,14 @@ impl<'a> DiskImageBuilder<'a> {
5251
}
5352

5453
/// Add or replace a kernel to be included in the final image.
55-
fn set_kernel(&mut self, path: &'a PathBuf) {
54+
pub fn set_kernel(&mut self, path: &'a PathBuf) {
5655
self.add_or_replace_file(path, KERNEL_FILE_NAME)
5756
}
5857

5958
/// Add or replace arbitrary files.
6059
/// NOTE: You can overwrite internal files if you choose, such as EFI/BOOT/BOOTX64.EFI
6160
/// This can be useful in situations where you want to generate an image, but not use the provided bootloader.
62-
fn add_or_replace_file(&mut self, path: &'a PathBuf, target: &'a str) {
61+
pub fn add_or_replace_file(&mut self, path: &'a PathBuf, target: &'a str) {
6362
self.files.insert(
6463
0,
6564
DiskImageFile::<'a> {

‎src/pxe.rs

-43
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.