isolation cmd will unpack "empty" partitions
This commit is contained in:
parent
6f33509a70
commit
312cf2f075
2 changed files with 9 additions and 10 deletions
|
@ -11,8 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type S19IsolateAllPartitionsCommand struct {
|
type S19IsolateAllPartitionsCommand struct {
|
||||||
FileName string `long:"file" short:"f" required:"true" description:"s19 filename"`
|
FileName string `long:"file" short:"f" required:"true" description:"s19 filename"`
|
||||||
OutputDir string `long:"out" short:"o" required:"true" description:"output dir, format:dir+mpar/bin"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (command *S19IsolateAllPartitionsCommand) Execute(args []string) error {
|
func (command *S19IsolateAllPartitionsCommand) Execute(args []string) error {
|
||||||
|
@ -59,10 +58,10 @@ func (command *S19IsolateAllPartitionsCommand) Execute(args []string) error {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if fpHeader.TotalSize == 0 {
|
// if fpHeader.TotalSize == 0 {
|
||||||
log.Warn().Msg("cannot extract a partition thats empty")
|
// log.Warn().Msg("cannot extract a partition thats empty")
|
||||||
continue
|
// continue
|
||||||
}
|
// }
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
outMBarFile, err := os.Create(path.Join("s19-dump", path.Base(command.FileName), fmt.Sprintf("part%d.mpar", index)))
|
outMBarFile, err := os.Create(path.Join("s19-dump", path.Base(command.FileName), fmt.Sprintf("part%d.mpar", index)))
|
||||||
|
|
|
@ -62,10 +62,10 @@ func (command *S19IsolatePartitionCommand) Execute(args []string) error {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if fpHeader.TotalSize == 0 {
|
// if fpHeader.TotalSize == 0 {
|
||||||
log.Error().Msg("cannot extract a partition thats empty")
|
// log.Error().Msg("cannot extract a partition thats empty")
|
||||||
return nil
|
// return nil
|
||||||
}
|
// }
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
outMBarFile, err := os.Create(command.OutputFileName)
|
outMBarFile, err := os.Create(command.OutputFileName)
|
||||||
|
|
Loading…
Add table
Reference in a new issue