Skip to content

Commit

Permalink
Merge pull request #499 from azayet01/fix-mount-fat-parts
Browse files Browse the repository at this point in the history
actions: Fix regression introduced with FAT{12|16|32} support.
  • Loading branch information
obbardc authored May 20, 2024
2 parents 09629ab + 84c4e58 commit d00c9f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion actions/image_partition_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,14 @@ func (i ImagePartitionAction) Run(context *debos.DebosContext) error {
dev := i.getPartitionDevice(m.part.number, *context)
mntpath := path.Join(context.ImageMntDir, m.Mountpoint)
os.MkdirAll(mntpath, 0755)
err = syscall.Mount(dev, mntpath, m.part.FS, 0, "")
fsType := m.part.FS
switch m.part.FS {
case "fat", "fat12", "fat16", "fat32", "msdos":
fsType = "vfat"
default:
break
}
err = syscall.Mount(dev, mntpath, fsType, 0, "")
if err != nil {
return fmt.Errorf("%s mount failed: %v", m.part.Name, err)
}
Expand Down

0 comments on commit d00c9f0

Please sign in to comment.