mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-27 18:18:45 +00:00
Merge pull request #499 from azayet01/fix-mount-fat-parts
actions: Fix regression introduced with FAT{12|16|32} support.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user