parent
c271c0babf
commit
c0a4e6ed7c
6
vendor/github.com/mitchellh/go-fs/fat/directory_cluster.go
generated
vendored
6
vendor/github.com/mitchellh/go-fs/fat/directory_cluster.go
generated
vendored
@ -7,9 +7,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/mitchellh/go-fs"
|
"github.com/mitchellh/go-fs"
|
||||||
"math"
|
"math"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"unicode/utf16"
|
"unicode/utf16"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DirectoryAttr uint8
|
type DirectoryAttr uint8
|
||||||
@ -160,8 +160,8 @@ func NewFat16RootDirectoryCluster(bs *BootSectorCommon, label string) (*Director
|
|||||||
|
|
||||||
// Create the volume ID entry
|
// Create the volume ID entry
|
||||||
result.entries[0] = &DirectoryClusterEntry{
|
result.entries[0] = &DirectoryClusterEntry{
|
||||||
attr: AttrVolumeId,
|
attr: AttrVolumeId,
|
||||||
name: label,
|
name: label,
|
||||||
cluster: 0,
|
cluster: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
vendor/github.com/mitchellh/go-fs/fat/super_floppy.go
generated
vendored
22
vendor/github.com/mitchellh/go-fs/fat/super_floppy.go
generated
vendored
@ -72,14 +72,24 @@ func (f *superFloppyFormatter) format() error {
|
|||||||
label = "FAT16 "
|
label = "FAT16 "
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine the number of root directory entries
|
// For 1.44MB Floppy, for other floppy formats see https://support.microsoft.com/en-us/kb/75131.
|
||||||
if f.device.Len() > 512*5*32 {
|
// We make an exception for this most common usecase as the calculations don't create a working image for older operating systems
|
||||||
bsCommon.RootEntryCount = 512
|
if f.config.FATType == FAT12 && f.device.Len() == 1474560 {
|
||||||
|
bsCommon.RootEntryCount = 224
|
||||||
|
bsCommon.SectorsPerFat = 9
|
||||||
|
bsCommon.SectorsPerTrack = 18
|
||||||
|
bsCommon.Media = 240
|
||||||
|
bsCommon.NumHeads = 2
|
||||||
} else {
|
} else {
|
||||||
bsCommon.RootEntryCount = uint16(f.device.Len() / (5 * 32))
|
// Determine the number of root directory entries
|
||||||
}
|
if f.device.Len() > 512*5*32 {
|
||||||
|
bsCommon.RootEntryCount = 512
|
||||||
|
} else {
|
||||||
|
bsCommon.RootEntryCount = uint16(f.device.Len() / (5 * 32))
|
||||||
|
}
|
||||||
|
|
||||||
bsCommon.SectorsPerFat = f.sectorsPerFat(bsCommon.RootEntryCount, sectorsPerCluster)
|
bsCommon.SectorsPerFat = f.sectorsPerFat(bsCommon.RootEntryCount, sectorsPerCluster)
|
||||||
|
}
|
||||||
|
|
||||||
bs := &BootSectorFat16{
|
bs := &BootSectorFat16{
|
||||||
BootSectorCommon: bsCommon,
|
BootSectorCommon: bsCommon,
|
||||||
|
9
vendor/vendor.json
vendored
9
vendor/vendor.json
vendored
@ -461,13 +461,14 @@
|
|||||||
{
|
{
|
||||||
"checksumSHA1": "mVqDwKcibat0IKAdzAhfGIHPwI8=",
|
"checksumSHA1": "mVqDwKcibat0IKAdzAhfGIHPwI8=",
|
||||||
"path": "github.com/mitchellh/go-fs",
|
"path": "github.com/mitchellh/go-fs",
|
||||||
"revision": "4f9d2cb031e44bef60d0c00ccb3f31f68867e85e",
|
"revision": "7bae45d9a684750e82b97ff320c82556614e621b",
|
||||||
"revisionTime": "2016-09-29T19:58:49Z"
|
"revisionTime": "2016-11-08T19:11:23Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "Z28nPI+n3iAnsqVSLCt5LZh/Zhg=",
|
"checksumSHA1": "B5dy+Lg6jFPgHYhozztz88z3b4A=",
|
||||||
"path": "github.com/mitchellh/go-fs/fat",
|
"path": "github.com/mitchellh/go-fs/fat",
|
||||||
"revision": "4f9d2cb031e44bef60d0c00ccb3f31f68867e85e"
|
"revision": "7bae45d9a684750e82b97ff320c82556614e621b",
|
||||||
|
"revisionTime": "2016-11-08T19:11:23Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "z235fRXw4+SW4xWgLTYc8SwkM2M=",
|
"checksumSHA1": "z235fRXw4+SW4xWgLTYc8SwkM2M=",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user