History log of /netbsd-current/sbin/gpt/gpt_uuid.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.21 27-Sep-2023 riastradh

gpt(8): Make gpt type array and enum match again.

Add cross-referencing comment to reduce the probability of these
getting out of sync again.

Should fix a slew of failing tests since kre's recent change to add
windows-recovery to the array but not to the enum:

sbin/gpt/t_gpt:create_2part
sbin/gpt/t_gpt:migrate_disklabel
sbin/gpt/t_gpt:recover_backup
sbin/gpt/t_gpt:recover_primary
sbin/gpt/t_gpt:remove_2part
sbin/gpt/t_gpt:resize_2part
sbin/gpt/t_gpt:restore_2part

Fail: stdout does not match golden output
--- /usr/tests/sbin/gpt/gpt.2part.show.normal 2023-09-26 15:48:30.000000000 +0000
+++ /tmp/check.sc6ylB/stdout 2023-09-26 23:30:42.388157924 +0000
@@ -3,6 +3,6 @@
1 1 Pri GPT header
2 32 Pri GPT table
34 1024 1 GPT part - EFI System
- 1058 9150 2 GPT part - NetBSD FFSv1/FFSv2
+ 1058 9150 2 GPT part - NetBSD Cryptographic Disk
10208 32 Sec GPT table
10240 1 Sec GPT header

https://releng.netbsd.org/b5reports/i386/commits-2023.09.html#build-2023.09.26.15.47.11


# 1.20 26-Sep-2023 kre

Recognise Windows Recovery partitions.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.19 30-Mar-2020 martin

Now that we use the same UUID for ZFS as FreeBSD, drop the FreeBSD marker
from the description.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.18 25-Jun-2019 jnemeth

adjust gpt_uuid_generate() to accept gpt==NULL


Revision tags: phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.17 20-Dec-2018 martin

Add a query function (for external code) to enumerate the know guids.
Add recently added VMware GUIDs to the internal enum type.
Fix some short names (bogus + duplicate).


Revision tags: pgoyette-compat-1126
# 1.16 06-Nov-2018 mrg

add support to detect the 3 vmware GPT partition types:

- VMKcore (dump partition)
- VMFS
- VMware reserved

this enables vmkcore partitions for netbsd swap or dump, as well
as naming all of them.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.15 16-Feb-2017 christos

branches: 1.15.10; 1.15.12;
allow 0 timestamp


# 1.14 16-Feb-2017 christos

Add -T timestamp for reproducible builds.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.13 06-Dec-2015 christos

branches: 1.13.2; 1.13.4;
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.


# 1.12 03-Dec-2015 christos

WARNS=6


# 1.11 01-Dec-2015 christos

merge command line parsers and check all memory allocations.


# 1.10 06-Dec-2014 mlelstv

branches: 1.10.2;
Add some more common partition types.


# 1.9 04-Oct-2014 riastradh

Paranoia: choke noisily on EOF from /dev/urandom.


# 1.8 04-Oct-2014 riastradh

Make gpt(8) generate v4 (random) uuids.

Don't needlessly leak your date/time and MAC address when you edit
the disk.

Read from /dev/urandom rather than calling arc4random or anything,
since this is a tool. (Cygwin seems to have /dev/urandom, but yell
if this breaks the build on your exotic platform because it lacks
/dev/urandom.)

ok apb


# 1.7 03-Oct-2014 christos

provide a copy of the kernel uuid generator (with portable API calls) for
tools.


# 1.6 03-Oct-2014 jnemeth

"0" is not guaranteed to be unique


# 1.5 02-Oct-2014 apb

include <sys/endian.h> for both the non-tools build,
and the tools build on a host where the file exists.

Fixes a build problem on FreeBSD, reported by Herbert J. Skuhra, where
tools/compat's configure detected that be32dec() and friends were
available in the host's <sys/endian.h>, so tools/compat did not provide
its own versions.


# 1.4 01-Oct-2014 apb

It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H


# 1.3 01-Oct-2014 jnemeth

actually return the uuid when parsing one that is in numeric format


# 1.2 30-Sep-2014 jnemeth

correctly show partition type in the new world order


# 1.1 30-Sep-2014 christos

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.


# 1.19 30-Mar-2020 martin

Now that we use the same UUID for ZFS as FreeBSD, drop the FreeBSD marker
from the description.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.18 25-Jun-2019 jnemeth

adjust gpt_uuid_generate() to accept gpt==NULL


Revision tags: phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.17 20-Dec-2018 martin

Add a query function (for external code) to enumerate the know guids.
Add recently added VMware GUIDs to the internal enum type.
Fix some short names (bogus + duplicate).


Revision tags: pgoyette-compat-1126
# 1.16 06-Nov-2018 mrg

add support to detect the 3 vmware GPT partition types:

- VMKcore (dump partition)
- VMFS
- VMware reserved

this enables vmkcore partitions for netbsd swap or dump, as well
as naming all of them.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.15 16-Feb-2017 christos

branches: 1.15.10; 1.15.12;
allow 0 timestamp


# 1.14 16-Feb-2017 christos

Add -T timestamp for reproducible builds.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.13 06-Dec-2015 christos

branches: 1.13.2; 1.13.4;
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.


# 1.12 03-Dec-2015 christos

WARNS=6


# 1.11 01-Dec-2015 christos

merge command line parsers and check all memory allocations.


# 1.10 06-Dec-2014 mlelstv

branches: 1.10.2;
Add some more common partition types.


# 1.9 04-Oct-2014 riastradh

Paranoia: choke noisily on EOF from /dev/urandom.


# 1.8 04-Oct-2014 riastradh

Make gpt(8) generate v4 (random) uuids.

Don't needlessly leak your date/time and MAC address when you edit
the disk.

Read from /dev/urandom rather than calling arc4random or anything,
since this is a tool. (Cygwin seems to have /dev/urandom, but yell
if this breaks the build on your exotic platform because it lacks
/dev/urandom.)

ok apb


# 1.7 03-Oct-2014 christos

provide a copy of the kernel uuid generator (with portable API calls) for
tools.


# 1.6 03-Oct-2014 jnemeth

"0" is not guaranteed to be unique


# 1.5 02-Oct-2014 apb

include <sys/endian.h> for both the non-tools build,
and the tools build on a host where the file exists.

Fixes a build problem on FreeBSD, reported by Herbert J. Skuhra, where
tools/compat's configure detected that be32dec() and friends were
available in the host's <sys/endian.h>, so tools/compat did not provide
its own versions.


# 1.4 01-Oct-2014 apb

It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H


# 1.3 01-Oct-2014 jnemeth

actually return the uuid when parsing one that is in numeric format


# 1.2 30-Sep-2014 jnemeth

correctly show partition type in the new world order


# 1.1 30-Sep-2014 christos

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.


# 1.18 25-Jun-2019 jnemeth

adjust gpt_uuid_generate() to accept gpt==NULL


Revision tags: phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.17 20-Dec-2018 martin

Add a query function (for external code) to enumerate the know guids.
Add recently added VMware GUIDs to the internal enum type.
Fix some short names (bogus + duplicate).


Revision tags: pgoyette-compat-1126
# 1.16 06-Nov-2018 mrg

add support to detect the 3 vmware GPT partition types:

- VMKcore (dump partition)
- VMFS
- VMware reserved

this enables vmkcore partitions for netbsd swap or dump, as well
as naming all of them.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.15 16-Feb-2017 christos

branches: 1.15.10; 1.15.12;
allow 0 timestamp


# 1.14 16-Feb-2017 christos

Add -T timestamp for reproducible builds.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.13 06-Dec-2015 christos

branches: 1.13.2; 1.13.4;
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.


# 1.12 03-Dec-2015 christos

WARNS=6


# 1.11 01-Dec-2015 christos

merge command line parsers and check all memory allocations.


# 1.10 06-Dec-2014 mlelstv

branches: 1.10.2;
Add some more common partition types.


# 1.9 04-Oct-2014 riastradh

Paranoia: choke noisily on EOF from /dev/urandom.


# 1.8 04-Oct-2014 riastradh

Make gpt(8) generate v4 (random) uuids.

Don't needlessly leak your date/time and MAC address when you edit
the disk.

Read from /dev/urandom rather than calling arc4random or anything,
since this is a tool. (Cygwin seems to have /dev/urandom, but yell
if this breaks the build on your exotic platform because it lacks
/dev/urandom.)

ok apb


# 1.7 03-Oct-2014 christos

provide a copy of the kernel uuid generator (with portable API calls) for
tools.


# 1.6 03-Oct-2014 jnemeth

"0" is not guaranteed to be unique


# 1.5 02-Oct-2014 apb

include <sys/endian.h> for both the non-tools build,
and the tools build on a host where the file exists.

Fixes a build problem on FreeBSD, reported by Herbert J. Skuhra, where
tools/compat's configure detected that be32dec() and friends were
available in the host's <sys/endian.h>, so tools/compat did not provide
its own versions.


# 1.4 01-Oct-2014 apb

It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H


# 1.3 01-Oct-2014 jnemeth

actually return the uuid when parsing one that is in numeric format


# 1.2 30-Sep-2014 jnemeth

correctly show partition type in the new world order


# 1.1 30-Sep-2014 christos

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.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.17 20-Dec-2018 martin

Add a query function (for external code) to enumerate the know guids.
Add recently added VMware GUIDs to the internal enum type.
Fix some short names (bogus + duplicate).


Revision tags: pgoyette-compat-1126
# 1.16 06-Nov-2018 mrg

add support to detect the 3 vmware GPT partition types:

- VMKcore (dump partition)
- VMFS
- VMware reserved

this enables vmkcore partitions for netbsd swap or dump, as well
as naming all of them.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.15 16-Feb-2017 christos

branches: 1.15.10;
allow 0 timestamp


# 1.14 16-Feb-2017 christos

Add -T timestamp for reproducible builds.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.13 06-Dec-2015 christos

branches: 1.13.2; 1.13.4;
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.


# 1.12 03-Dec-2015 christos

WARNS=6


# 1.11 01-Dec-2015 christos

merge command line parsers and check all memory allocations.


# 1.10 06-Dec-2014 mlelstv

branches: 1.10.2;
Add some more common partition types.


# 1.9 04-Oct-2014 riastradh

Paranoia: choke noisily on EOF from /dev/urandom.


# 1.8 04-Oct-2014 riastradh

Make gpt(8) generate v4 (random) uuids.

Don't needlessly leak your date/time and MAC address when you edit
the disk.

Read from /dev/urandom rather than calling arc4random or anything,
since this is a tool. (Cygwin seems to have /dev/urandom, but yell
if this breaks the build on your exotic platform because it lacks
/dev/urandom.)

ok apb


# 1.7 03-Oct-2014 christos

provide a copy of the kernel uuid generator (with portable API calls) for
tools.


# 1.6 03-Oct-2014 jnemeth

"0" is not guaranteed to be unique


# 1.5 02-Oct-2014 apb

include <sys/endian.h> for both the non-tools build,
and the tools build on a host where the file exists.

Fixes a build problem on FreeBSD, reported by Herbert J. Skuhra, where
tools/compat's configure detected that be32dec() and friends were
available in the host's <sys/endian.h>, so tools/compat did not provide
its own versions.


# 1.4 01-Oct-2014 apb

It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H


# 1.3 01-Oct-2014 jnemeth

actually return the uuid when parsing one that is in numeric format


# 1.2 30-Sep-2014 jnemeth

correctly show partition type in the new world order


# 1.1 30-Sep-2014 christos

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.


# 1.15 16-Feb-2017 christos

allow 0 timestamp


# 1.14 16-Feb-2017 christos

Add -T timestamp for reproducible builds.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.13 06-Dec-2015 christos

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.


# 1.12 03-Dec-2015 christos

WARNS=6


# 1.11 01-Dec-2015 christos

merge command line parsers and check all memory allocations.


# 1.10 06-Dec-2014 mlelstv

branches: 1.10.2;
Add some more common partition types.


# 1.9 04-Oct-2014 riastradh

Paranoia: choke noisily on EOF from /dev/urandom.


# 1.8 04-Oct-2014 riastradh

Make gpt(8) generate v4 (random) uuids.

Don't needlessly leak your date/time and MAC address when you edit
the disk.

Read from /dev/urandom rather than calling arc4random or anything,
since this is a tool. (Cygwin seems to have /dev/urandom, but yell
if this breaks the build on your exotic platform because it lacks
/dev/urandom.)

ok apb


# 1.7 03-Oct-2014 christos

provide a copy of the kernel uuid generator (with portable API calls) for
tools.


# 1.6 03-Oct-2014 jnemeth

"0" is not guaranteed to be unique


# 1.5 02-Oct-2014 apb

include <sys/endian.h> for both the non-tools build,
and the tools build on a host where the file exists.

Fixes a build problem on FreeBSD, reported by Herbert J. Skuhra, where
tools/compat's configure detected that be32dec() and friends were
available in the host's <sys/endian.h>, so tools/compat did not provide
its own versions.


# 1.4 01-Oct-2014 apb

It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H


# 1.3 01-Oct-2014 jnemeth

actually return the uuid when parsing one that is in numeric format


# 1.2 30-Sep-2014 jnemeth

correctly show partition type in the new world order


# 1.1 30-Sep-2014 christos

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.


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.13 06-Dec-2015 christos

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.


# 1.12 03-Dec-2015 christos

WARNS=6


# 1.11 01-Dec-2015 christos

merge command line parsers and check all memory allocations.


# 1.10 06-Dec-2014 mlelstv

branches: 1.10.2;
Add some more common partition types.


# 1.9 04-Oct-2014 riastradh

Paranoia: choke noisily on EOF from /dev/urandom.


# 1.8 04-Oct-2014 riastradh

Make gpt(8) generate v4 (random) uuids.

Don't needlessly leak your date/time and MAC address when you edit
the disk.

Read from /dev/urandom rather than calling arc4random or anything,
since this is a tool. (Cygwin seems to have /dev/urandom, but yell
if this breaks the build on your exotic platform because it lacks
/dev/urandom.)

ok apb


# 1.7 03-Oct-2014 christos

provide a copy of the kernel uuid generator (with portable API calls) for
tools.


# 1.6 03-Oct-2014 jnemeth

"0" is not guaranteed to be unique


# 1.5 02-Oct-2014 apb

include <sys/endian.h> for both the non-tools build,
and the tools build on a host where the file exists.

Fixes a build problem on FreeBSD, reported by Herbert J. Skuhra, where
tools/compat's configure detected that be32dec() and friends were
available in the host's <sys/endian.h>, so tools/compat did not provide
its own versions.


# 1.4 01-Oct-2014 apb

It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H


# 1.3 01-Oct-2014 jnemeth

actually return the uuid when parsing one that is in numeric format


# 1.2 30-Sep-2014 jnemeth

correctly show partition type in the new world order


# 1.1 30-Sep-2014 christos

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.