Skip to content

Commit ec6d8f9

Browse files
committed
Merge branch 'release/v0.3.3'
2 parents 87138c2 + f38856c commit ec6d8f9

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

_layouts/default.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
<!-- Favicon
1818
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
1919
<link rel="icon" href="static/img/favicon.png" type="img/png">
20+
<script>
21+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
22+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
23+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
24+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
25+
26+
ga('create', 'UA-83927116-3', 'auto');
27+
ga('send', 'pageview');
28+
</script>
2029
</head>
2130

2231
<body>
@@ -56,4 +65,4 @@ <h2>Command Line Utility for flashing/initializing Linux based single board comp
5665
</div>
5766
</body>
5867

59-
</html>
68+
</html>

workstation/w_windows.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,25 @@ const diskSelectionTries = 3
103103
const writeAttempts = 5
104104

105105
// CopyToDisk Notifies user to choose a mount, after that it tries to copy the data
106-
func (l *linux) CopyToDisk(img string) (job *help.BackgroundJob, err error) {
106+
func (w *windows) CopyToDisk(img string) (job *help.BackgroundJob, err error) {
107107
log.Debug("CopyToDisk")
108-
_, err = l.ListRemovableDisk()
108+
_, err = w.ListRemovableDisk()
109109
if err != nil {
110110
fmt.Println("[-] SD card is not found, please insert an unlocked SD card")
111111
return nil, err
112112
}
113113

114114
var dev *MountInfo
115-
if len(l.Disk) == 0 {
116-
rng := make([]string, len(l.workstation.mounts))
117-
for i, e := range l.workstation.mounts {
115+
if len(w.Disk) == 0 {
116+
rng := make([]string, len(w.workstation.mounts))
117+
for i, e := range w.workstation.mounts {
118118
rng[i] = fmt.Sprintf(dialogs.PrintColored("%s")+" - "+dialogs.PrintColored("%s")+" (%s)", e.deviceName, e.diskName, e.deviceSize)
119119
}
120120
num := dialogs.SelectOneDialog("Select disk to format: ", rng)
121-
dev = l.workstation.mounts[num]
121+
dev = w.workstation.mounts[num]
122122
} else {
123-
for _, e := range l.workstation.mounts {
124-
if e.diskName == l.Disk {
123+
for _, e := range w.workstation.mounts {
124+
if e.diskName == w.Disk {
125125
dev = e
126126
break
127127
}
@@ -131,11 +131,11 @@ func (l *linux) CopyToDisk(img string) (job *help.BackgroundJob, err error) {
131131
}
132132
}
133133

134-
l.workstation.mount = dev
134+
w.workstation.mount = dev
135135
fmt.Printf("[+] Writing image to %s\n", dev.diskName)
136136
log.WithField("image", img).WithField("mount", "N:").Debugf("Writing image to %s", dev.diskName)
137137

138-
if err := l.CleanDisk(dev.diskName); err != nil {
138+
if err := w.CleanDisk(dev.diskName); err != nil {
139139
return nil, err
140140
}
141141

@@ -231,7 +231,7 @@ func (w *windows) WriteToDisk(img string) (job *help.BackgroundJob, err error) {
231231
if strings.Contains(sout, "Access is denied") || strings.Contains(sout, "The device is not ready") {
232232
fmt.Println("\n[-] Can't write to disk. Please make sure to run this tool as administrator, close all Explorer windows, try reconnecting your disk and finally reboot your computer.\n [-] You may need to run this tool with `clean` argument to clean your disk partition table before applying image.")
233233
if dialogs.YesNoDialog("Or we can try to clean it's partitions right now, should we proceed?") {
234-
if derr := w.CleanDisk(); derr != nil {
234+
if derr := w.CleanDisk(""); derr != nil {
235235
fmt.Println("[-] Disk cleaning failed:", derr)
236236
continue
237237
} else {

0 commit comments

Comments
 (0)