Merge "[lk] Roll to a valid upstream revision."
diff --git a/cmd/zedmon/record.go b/cmd/zedmon/record.go
index 9aec977..1c71cb6 100644
--- a/cmd/zedmon/record.go
+++ b/cmd/zedmon/record.go
@@ -61,7 +61,7 @@
}
defer zedmon.Close()
- f, err := os.OpenFile("zedmon.csv", os.O_CREATE|os.O_RDWR, 0666)
+ f, err := os.OpenFile("zedmon.csv", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666)
if err != nil {
fmt.Printf("Can't open zedmon.csv: %v", err)
return subcommands.ExitFailure
diff --git a/docs/compilation.md b/docs/compilation.md
index 8e0f671..9057b2c 100644
--- a/docs/compilation.md
+++ b/docs/compilation.md
@@ -10,9 +10,9 @@
### Building
```bash
-> git clone https://fuchsia.googlesource.com/zedmon --recurse-submodules
-> cd zedmon/firmware
-> make
+git clone https://fuchsia.googlesource.com/zedmon --recurse-submodules
+cd zedmon/firmware
+make
```
The builds output will end up in `./build-zedmon`.
@@ -28,9 +28,9 @@
Once the device is in DFU mode, you can upload the firmware with `dfu-util`:
- ```bash
- > dfu-util -a 0 -s 0x08000000:leave -D build-zedmon/lk.bin -d 0483:df11
- ```
+```bash
+dfu-util -a 0 -s 0x08000000:leave -D build-zedmon/lk.bin -d 0483:df11
+```
## `zedmon` Command Line Utility
@@ -40,7 +40,7 @@
required to build the command line utility:
```bash
-> sudo apt-get install golang libusb-1.0-0-dev
+sudo apt-get install golang libusb-1.0-0-dev
```
### Fetching Source
@@ -50,14 +50,14 @@
you'll need to check it out manually:
```bash
-> mkdir -p zedmonutil/src/fuchsia.googlesource.com
-> cd zedmonutil
-> export GOPATH=`pwd`
-> cd src/fuchsia.googlesource.com
-> git clone https://fuchsia.googlesource.com/zedmon
-> cd $GOPATH
-> go get fuchsia.googlesource.com/zedmon
-> go install fuchsia.googlesource.com/zedmon/cmd/zedmon
+mkdir -p zedmonutil/src/fuchsia.googlesource.com
+cd zedmonutil
+export GOPATH=`pwd`
+cd src/fuchsia.googlesource.com
+git clone https://fuchsia.googlesource.com/zedmon
+cd $GOPATH
+go get fuchsia.googlesource.com/zedmon
+go install fuchsia.googlesource.com/zedmon/cmd/zedmon
```
The output executable will be in `./bin/zedmon`.