[mkzedboot] Only chown block device if not writeable

When testing paver changes on x64, it's convenient to set up a udev rule
to make your USB key be owned by your user, so you don't have to type
your sudo password to chown the block device for every iteration cycle.

But then the mkzedboot script runs sudo chown unconditionally anyway.
It doesn't have to -- we could check whether we already have write
permissions to the block device before doing the `sudo chown` call.

Tested by running `fx mkzedboot /dev/sda` twice: once with /dev/sda
owned by my user, where the sudo chown was not needed, and once with
/dev/sda owned by root, where the sudo chown was needed and ran as
expected.

Change-Id: I07d090dd51465cfea7518dcde3f98c726bdb915e
1 file changed
tree: 533561d8d45fb1d58f12cb9964bbf766ee46ef37
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. examples/
  7. garnet/
  8. infra/
  9. peridot/
  10. products/
  11. scripts/
  12. sdk/
  13. src/
  14. third_party/
  15. tools/
  16. zircon/
  17. .clang-format
  18. .clang-tidy
  19. .dir-locals.el
  20. .gitattributes
  21. .gitignore
  22. .gn
  23. AUTHORS
  24. BUILD.gn
  25. CODE_OF_CONDUCT.md
  26. CONTRIBUTING.md
  27. LICENSE
  28. OWNERS
  29. PATENTS
  30. README.md
  31. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See the documentation.