christos
47a4080915
use __arraycount
2017-09-07 10:23:33 +00:00
christos
d68621905c
- make sure that the utf16 string is padded with 0's where needed.
...
- since the utf16 string is not 0 terminated, pass the size of the string.
2017-09-06 18:17:18 +00:00
kre
eb67406f45
Avoiding having parameter name shadow its own function's name.
...
Strictly this shouldnt be (and hasn't been for almost a year) a problem,
but there are compilers that warn about locals shadowing globals (which
this is/was) and it is easy to avoid, so ... No functinal difference.
2016-10-05 03:06:24 +00:00
kre
c2246a3f2c
Make "gpt show" add an "(active)" annotation to the PMBR output line
...
when it has been marked active for legacy (non UEFI) booting.
This was (kind of obviously) intended by the previous commit, but...
2016-06-09 17:43:36 +00:00
christos
3017a7a39f
PR/51230: Add the ability to set the active flag in the PMBR.
2016-06-09 15:12:54 +00:00
dholland
dea44b9dd8
PR 50756 David Binderman: avoid running off the end of an array in case
...
thing we're looking for isn't there. Which is probably impossible, but
that's not obvious.
2016-05-31 02:29:54 +00:00
christos
f9db75489b
- add more informational messages
...
- handle case where last argument is an option not a device (set -l)
2015-12-29 16:45:04 +00:00
martin
1c2d0f1f02
Improve "show -a" display: split human readable Type: field from the Type-GUID
...
to avoid wrapping in the common case; add a human readable Size: display.
2015-12-26 13:08:45 +00:00
wiz
6471a2935e
Simplify usage for gpt show.
2015-12-25 12:16:03 +00:00
martin
53078a2022
Add a -a flag to the show command, so we can display the full GPT with
...
all information in one go.
2015-12-25 10:59:56 +00:00
christos
4d523900d0
Add listing commands for type, set and unset.
...
Add help and formatting for set and unset.
Change show to print all the attribute info in one line.
2015-12-06 00:39:26 +00:00
christos
c8b27b5883
fix label printing.
2015-12-04 01:46:12 +00:00
christos
5c1ccc6e9b
WARNS=6
2015-12-03 02:02:43 +00:00
christos
da0a3b4c0b
eliminate static globals so that commands can be re-used.
2015-12-03 01:07:28 +00:00
christos
cdf86847f5
refactor the utf code so that it does not leak memory.
2015-12-02 04:07:11 +00:00
christos
0f004afe33
merge command line parsers and check all memory allocations.
2015-12-01 23:29:07 +00:00
christos
8ca93e4658
Refactor the command dispatching and help printing logic.
2015-12-01 16:32:19 +00:00
christos
0b43d398b9
Firs step of refactoring, remove all globals, factor out some common code,
...
handle alternate usage but not advertise it.
2015-12-01 09:05:33 +00:00
christos
2d178fa50d
Add the missing cases.
2015-11-29 14:12:56 +00:00
christos
ca4e0dcdd1
merge the create errors in one place and fix them.
2015-11-29 00:14:46 +00:00
jnemeth
20f10808c3
correctly show partition type in the new world order
2014-09-30 22:56:36 +00:00
jnemeth
0e826d2ca3
Check size of correct buffer. Note, just being pedantic as the buffer
...
being checked is the same size as the one that should have been checked.
2014-09-30 20:23:23 +00:00
christos
21c34dbb1d
Add internal uuid support, since the linux+macos versions of the library
...
are different than than *bsd ones, and others might not have it at all.
2014-09-30 17:59:59 +00:00
christos
c917041fda
remove compat defines.
2014-09-30 02:12:55 +00:00
christos
4da1cfa89d
more toolification changes
2014-09-29 22:22:03 +00:00
christos
a50708a134
minor toolification: need libprop...
2014-09-29 20:28:57 +00:00
jnemeth
6f2d9e3758
If we want to GUIDs to display with correct endian, it helps to decode it first.
2013-12-18 03:20:09 +00:00
jnemeth
66ad0e75ae
For the "show -i <entry>" subcommand, print Start and Size both in
...
terms of number of sectors and bytes.
2013-12-09 01:35:02 +00:00
jnemeth
e3e68bccc8
fix off-by-one error
2013-12-08 08:30:01 +00:00
jnemeth
925666ef9b
Add two new options:
...
-g which shows the GUID for a partition
-i which shows all the gory details for a particular option
XXX the output format of -i is subject to change
2013-11-30 19:43:53 +00:00
jnemeth
f2e89ca7fd
recognize FreeBSD ZFS partition
2013-10-19 02:07:08 +00:00
jakllsch
0c2fc5cb54
Make pre-initialized partition type uuid_t symbols 'static const'.
...
This conserves a few hundred bytes of total program size by
allowing the linker to merge duplicates.
2013-04-13 18:32:01 +00:00
jakllsch
287267eb57
Clean up gpt(8) a bit more
...
uuid_create_nil(3) and uuid_is_nil(3) take a uuid_t*, not a pointer to
an array of bytes merely casted to compatible type.
Additonally, there no need for extra casts and address-of operations when
using le_uuid_*() functions.
Furthermore, le_uuid_*() are identical to uuid_*_le functions in
libc/libuuid, so use those instead on NetBSD.
2013-04-13 18:04:33 +00:00
jakllsch
6959a7ad63
Now that GPT_ENT_TYPE_LINUX_DATA is diffrent from the Windows one, use it.
2013-01-18 17:58:15 +00:00
joerg
a4b65553ae
Use __dead
2011-08-27 17:38:16 +00:00
jakllsch
5da707b805
UFS is called FFS in the NetBSD case. Display as such and accept as input.
2011-01-06 16:30:40 +00:00
christos
dd771215eb
PR/38094: Robert Millan: support "BIOS Boot" partition type in gpt(8)
2008-02-24 18:38:10 +00:00
riz
42a4e6ef13
As discussed on tech-userlevel, add NetBSD GPT partition types for
...
swap, ffs, lfs, raidframe, ccd and cgd. gpt(8) now defaults to
NetBSD ffs if no type is given, but previous FreeBSD types are
still recognized in the DKWEDGE_AUTODISCOVER code.
2007-12-28 19:53:09 +00:00
riz
0fac2edb7f
Fix the usage strings for each command, and print them all for the
...
"global" usage. It's still a little ugly, but hopefully not as
fantastically confusing as before...
2007-12-18 21:46:45 +00:00
christos
9b52236568
Make this work under NetBSD.
2006-10-15 22:36:29 +00:00
christos
5819a8c09d
Import the gpt tool from FreeBSD
2006-10-15 22:34:15 +00:00