Skip to content

Commit

Permalink
add hidden --use-diskfs flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Moser authored and smoser committed Mar 10, 2023
1 parent d0c9408 commit 42e03bb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/cmd/oci-iso/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
Bios = "bios"
BootLayerName = "live-boot:latest"
ISOLabel = "OCI-BOOT"
ImplDiskfs = "diskfs"
)

const (
Expand Down Expand Up @@ -546,8 +547,7 @@ func (o *OciBoot) CreateDisk(diskFile string, opts DiskOptions) error {
fsSize := int64(p.Size())
fsStart := int64(p.Start)

opts.Impl = "diskfs"
if opts.Impl == "diskfs" {
if opts.Impl == ImplDiskfs {
if err := createAndCopyToFat32DiskFS(tmpd, diskFile, fsStart, fsSize); err != nil {
return err
}
Expand Down Expand Up @@ -999,6 +999,9 @@ func doMain(ctx *cli.Context) error {
EFIBootMode: efiMode,
CommandLine: ctx.String("cmdline"),
}
if ctx.Bool("use-diskfs") {
opts.Impl = ImplDiskfs
}
if err := ociBoot.CreateDisk(output, opts); err != nil {
return err
}
Expand All @@ -1024,6 +1027,11 @@ func main() {
Name: "cdrom",
Usage: "create a cdrom (iso9660) rather than a disk",
},
cli.StringFlag{
Name: "use-diskfs",
Usage: "use the go-diskfs for fat filesystem operations",
Hidden: true,
},
cli.StringFlag{
Name: "boot",
Usage: "boot-mode: one of 'efi-shim', 'efi-kernel', or 'efi-auto'",
Expand Down

0 comments on commit 42e03bb

Please sign in to comment.