History log of /fuchsia/zircon/system/uapp/gpt/gpt.c
Revision Date Author Comments
# 260b8eef 11-Dec-2017 Brian Swetland <swetland@google.com>

[bootloader] handle loading zircon image from partition

- identify which block device the bootloader was loaded from
- check first type-guid==zircon-a partition for a valid image
- prefer that image (if present) over zircon.bin in EFI/FAT
- update gpt commandline tool to know about zircon-a, etc types

Test: verified operation on actual hw by swetland and raggi

Change-Id: I8eeb24c0ab03ee54f086a2619718daa9d0011b6e


# 05d1d15b 16-Jun-2018 Adam Barth <abarth@chromium.org>

[cprng] Update clients to zx_cprng_draw

Test: cprng, chromeos-disk-setup
Change-Id: I8fffa468ceec58a371c8eaa0c6bbdaa204e77df8


# 8f341f20 09-Jun-2018 Adam Barth <abarth@chromium.org>

[cprng] Remove short reads from zx_cprng_draw

We never actually generate short reads from zx_cprng_draw. This CL
removes the |actual| out parameter. Now zx_cprng_draw either fails or
succeeds in drawing the amount requested, simplifying clients and
removing possible mistakes.

This CL is phase 1 of the transition, which introduces the new version as
zx_cprng_draw_new. Once all the clients are migrated, we'll change
zx_cprng_draw itself, migrate all the clients back, and then remove
zx_cprng_draw_new.

Change-Id: I2219d0517f103fb999014de1e846fa8b8a5ca20c


# a0672e5d 02-May-2018 Roland McGrath <mcgrathr@google.com>

[public][ulib][dev] Add __FALLTHROUGH macro for warning suppression

GCC 7 enables -Wimplicit-fallthrough with -Wextra, so we'll get it.
Clang has it available, so start using it and clean up code accordingly.

The GCC feature will actually recognize some formulaic comments to
suppress the warning. But there's also an explicit syntax, and
C++17 added a standard one. So use that instead, via the new macro
__FALLTHROUGH in <zircon/compiler.h>.

TC-36 #comment Clean up code in preparation for more -Wimplicit-fallthrough

Change-Id: I28309c91c32db1313d52f4255836c5ea687e141f


# c99c8c07 04-Mar-2018 Adam Barth <abarth@chromium.org>

[blobstore] Rename blobstore to blobfs

Also, mount blobfs at /blob rather than /blobstore.

Change-Id: Ifdc473752ede37b909b30e35dbaac1397565a659


# 78cfb6d2 06-Dec-2017 James Tucker <raggi@google.com>

[gpt][minfs] add installer partition type

This partition type GUID is auto-mounted at /install and will be used by
installer USB keys and such use cases, maybe recovery.

Change-Id: I959c462182285d39b9d8943a8d785857aa7880a1


# 9b154b7e 21-Nov-2017 Sean Klein <seanmarionklein@gmail.com>

[gpt] Consolidate c-string / UTF-16 conversion

Change-Id: Ic3c801ce8d5f22ae2d9c7e22254387a2bf427105


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# b2a0e6f7 31-Aug-2017 Brian Swetland <swetland@google.com>

[gpt] improve quality of life

- show new partition table before confirmation prompt
- highlight modified fields in new partition table
- add gpt_get_diffs() to library to enable the above
- wait at confirmation prompt until y/n/ESC pressed
- add "adjust" command to move or resize partitions
- add "--live-dangerously" initial option to override
confirmation prompt for those who are very sure

Change-Id: I90e470c44053ee64f283a7ed88dc7e627b08f783


# 1f3be07f 31-Aug-2017 Todd Eisenberger <teisenbe@google.com>

[gpt] Implement modifying CrOS kernel GPT flags

This lets us set the successful, priority, and tries values.

Change-Id: I491d7bb6f80a3271cbd39120fc2f51487b0d242f


# bda85a2a 31-Aug-2017 Todd Eisenberger <teisenbe@google.com>

[gpt] Add support for using CrOS partition attributes

This adds library support for getting/setting the attributes, and
updates the gpt command to dump them.

Change-Id: I0f4d68de416331c7b4e8f1e80e9cfb5df2df6540


# 9abac6d4 16-Jun-2017 George Kulakowski <kulakowski@google.com>

[uapp][status] Use the new MX_OK and MX_ERR_* mx_status_t names

Change-Id: Iaa8c8c12736e49d202c33612b22d2acd528fcf2d


# 804e2385 31-May-2017 Mike Voydanoff <voydanoff@google.com>

[uapp][gpt] Make "gpt init" clear existing GPT partition maps

"gpt init" was able to create new gpt partition maps where none
existed before, but was not actually reinitializing existing
partition maps.

Change-Id: Ie2dbabc65d32a8e9076e730f13560648a3b2c2a3


# 46043f89 27-Apr-2017 Travis Geiselbrecht <travisg@google.com>

[app][gpt] fix repartition command to not fail if there are no existing partitions

Change-Id: Ica3dbd490c9947bb05e0924d7f0408b97dfc7ac0


# 2a55f894 19-Apr-2017 Yvonne Yip <yky@google.com>

[udev][sata] support scatter/gather

Support discontiguous iotxns and increase the PRD table size to 8k,
so the maximum worst-case transfer size is 32M for a fully
distiguous iotxn. Add a field in block_info_t to return this info.

Change-Id: I68f3cf6c25ca2d2cbe709768bfa43e1fc20e300e


# e59d13e2 21-Apr-2017 James Tucker <jftucker@gmail.com>

[gpt] add easy repartition command

example usage:

gpt repartition /dev/class/block-core/000 esp efi 100m sys system 1g data data 100%

Change-Id: I8e8c7f59512f6c9f2ee188afc000ad7bb71e6e21


# b23c8167 21-Apr-2017 Sean Klein <seanmarionklein@gmail.com>

[block] Convert BLOCK SIZE ioctls to GET_INFO

MG-709 #done

Change-Id: I96a7ca110a1e33eded5e6a2ee2535131c7b7ade6


# eefecda3 21-Apr-2017 James Tucker <jftucker@gmail.com>

[gpt] add blobfs support to gpt tool

Change-Id: Ib995c0eda698c696d228841e47e1b88c934f491a


# 67068bdb 28-Mar-2017 Sean Klein <smklein@google.com>

[gpt] Make GPT tool more usable; update MinFS instructions

- Remove the "Default block device". On real hardware, magically
updating a potentially random device is a recipe for disaster.
- Add operation to ulib/gpt to query usable range of GPT, so user
does not need to calculate size of metadata themselves.
- Add operation to uapp/gpt to initialize empty gpt, so the range of
the GPT may subsequently be queried.
- Improve uapp/gpt usage description to document tool.
- Update uapp/gpt tool to print all block ranges in decimal,
not hex.
- Update uapp/gpt to add partitions by range (start, end), matching
the range presented by the "dump" command.
- Update MinFS instructions to use less "magic" (no assumptions about
underlying block size), and use the new GPT instructions.

Change-Id: Idbb9f6104d0f9b9d8d6efd685686a29a4e4f7e82


# f1351d93 15-Feb-2017 George Kulakowski <kulakowski@google.com>

[gpt] Check result of mx_cprng_draw call

Change-Id: I67833eeff3b5df151f9ef813cc0e5fd30f221611


# 4c19e93d 31-Jan-2017 Justin Mattson <jmatt@google.com>

[uapp][gpt] Add some keywords for well-known GUIDs

Recognize keywords for efi, system, and data.

Change-Id: I0818a253b1087ea4ce1c01643eccb5c89aabd3f2


# 7006ae17 07-Dec-2016 Roland McGrath <mcgrathr@google.com>

Remove mx_size_t and mx_ssize_t types

mx_ssize_t is no longer used. mx_size_t is superfluous and
can be replaced by the standard C type size_t.

Change-Id: I2137af6f166099d2e8aaca4fab63ff101f2a43ac


# 20de95b1 30-Nov-2016 Justin Mattson <jmatt@google.com>

[app] [gpt] Fix up little issues in 15713

Change-Id: I961f45024d3c28873356d8adc66e3d09356c0ba8


# e67cade3 21-Nov-2016 Justin Mattson <jmatt@google.com>

[uapp] [gpt] Allowing partition hiding from EFI

Change-Id: I1c94518dfca668b824f3fa8d7c67d929853757c1


# 2ed82cf3 17-Nov-2016 Justin Mattson <jmatt@google.com>

[uapp][gpt] Add ability to edit partition guids in gpt application

This allows the 'gpt' utility to edit the type or ID guids of a
partition in the GPT.
Change-Id: I68f0547f0c737763b0a7a66f4c518d76fe94e83d


# 91ad1495 01-Nov-2016 Brian Swetland <swetland@google.com>

[syscalls] update cprng_add_entropy() and cprng_draw()

Change-Id: I59aa8884aa2df2426fb87fe4deeae8846f146cb1


# 6313df1d 27-Oct-2016 George Kulakowski <kulakowski@google.com>

[mxio] Remove most uses of mxio_wait_fd

The two remaining callers can actually have a finite timeout.

Change-Id: I48c4af3604c46af4cb614e36777603c55b46d65e


# 19005180 27-Sep-2016 Doug Evans <dje@google.com>

[userspace] Use PRI?64 macros instead of %ll?

Bug: MG-164

This is the official way to print *int64_t types.

Change-Id: Ib4c7c814a62678650b1691bc1925635235ade217


# d4681065 22-Sep-2016 Tim Kilbourn <tkilbourn@google.com>

[gpt] Use ioctl wrappers

Change-Id: I5e17714d70556c123432daf4a76e722d9aba04a4


# 1900a35c 26-Aug-2016 Brian Swetland <swetland@google.com>

[magenta] migrate from libddk to magenta/device headers

Change-Id: I91a8df001043635fa595d6fed1a6d6f092fc6b3e


# 8c7a92b0 23-Aug-2016 Yvonne Yip <yky@google.com>

[gpt] print out the guid in the proper byte order

Change-Id: I22ef93d957b99a64f8b3e8ff650e4f01cc00b04c


# 0b8ac75d 24-Aug-2016 Brian Swetland <swetland@google.com>

[magenta][ddk] normalize ioctl defines

- ioctls are now unique
- ioctls now encode a kind, family, and number
- ioctls that return a handle are of IOCTL_KIND_GET_HANDLE
- remoteio plumbing updated to reflect this
- drivers and ioctl users updated

Change-Id: Ic202cec6336a4915b09e3cbfff5dc6389f397288


# 57fb2453 15-Aug-2016 Yvonne Yip <yky@google.com>

[udev][sata] implement ioctl to reread partitions

Change-Id: I9ba8a4e4396e3c5f6fe10ba628f616269b5147cd


# 66a201f1 16-Aug-2016 Brian Swetland <swetland@frotz.net>

[system] align license and license banners with Fuchsia

This adjusts the Magenta userspace code to match the prevailing
license in Fuchsia (three-clause BSD), using the same banner
and license text.

Change-Id: I6b6d79435c5dbaa32027888874849e4f47aaa7be


# 601836c8 05-Aug-2016 Yvonne Yip <yky@google.com>

[ulib] add gpt manipulation library and utility

Change-Id: I2f9bb765fd26f97e2e88dc239bc2ab43d6e3af00