The NetBSD Project

CVS log for src/sbin/gpt/gpt.c

[BACK] Up to [cvs.NetBSD.org] / src / sbin / gpt

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.87 / (download) - annotate - [select for diffs], Wed Dec 13 06:51:57 2023 UTC (3 months, 2 weeks ago) by mrg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.86: +2 -3 lines
Diff to previous 1.86 (colored) to selected 1.69 (colored)

avoid use after free.  skip the QUIET check already in gpt_warn().

Revision 1.86 / (download) - annotate - [select for diffs], Mon Dec 11 12:45:22 2023 UTC (3 months, 2 weeks ago) by mlelstv
Branch: MAIN
Changes since 1.85: +7 -2 lines
Diff to previous 1.85 (colored) to selected 1.69 (colored)

Be verbose about errors.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Sep 26 15:55:46 2023 UTC (6 months ago) by kre
Branch: MAIN
Changes since 1.84: +51 -2 lines
Diff to previous 1.84 (colored) to selected 1.69 (colored)


When extracting the attributes (to printable form), avoid simply ignoring
any attribute bits which are unknown, print them as a hex value.  This
avoids "Attributes: " for most windows filesystem types, which all seem
to have but 63 set (which is supposed to mean "don't assign a drive letter"
which is akin to "noauto" in fstab - except it is set even on partitions
which do get mounted, so must mean something subtly different).

These upper 16 attribute bits are supposed to be file system type speficic
(in practice, they seem to be common to all filesystem types from one vendor)
but we don't have the info (yet anyway) to treat them like that.

ChromeOS seems to treat some of the bits as bit fields containing numeric
values - add #if 0'd (but compile tested) code to deal with those (maybe,
compile tested - but not execution tested) should someone ever get an
environment where these things occur, and could add the missing definitions
to actually test this.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Nov 22 00:25:52 2022 UTC (16 months ago) by mlelstv
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.83: +5 -3 lines
Diff to previous 1.83 (colored) to selected 1.69 (colored)

Big-Endian fixes.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Nov 20 11:57:02 2022 UTC (16 months, 1 week ago) by mlelstv
Branch: MAIN
Changes since 1.82: +20 -3 lines
Diff to previous 1.82 (colored) to selected 1.69 (colored)

Fix destroying and moving GPT header also for truncated/extended
images.

Revision 1.82 / (download) - annotate - [select for diffs], Sun May 24 18:42:20 2020 UTC (3 years, 10 months ago) by jmcneill
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) to selected 1.69 (colored)

Add -H flag to ignore existing MBR (Hybrid MBR/GPT mode).

Revision 1.74.4.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:20 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.74.4.1: +35 -5 lines
Diff to previous 1.74.4.1 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored) to selected 1.69 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.81 / (download) - annotate - [select for diffs], Fri Oct 11 23:04:52 2019 UTC (4 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored) to selected 1.69 (colored)

gpt_uuid_parse does not set errno ...

Revision 1.80 / (download) - annotate - [select for diffs], Tue Jun 25 03:50:18 2019 UTC (4 years, 9 months ago) by jnemeth
Branch: MAIN
CVS Tags: netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.79: +28 -1 lines
Diff to previous 1.79 (colored) to selected 1.69 (colored)

Add gpt_change_hdr() similar to gpt_change_ent() for changing
arbitrary header fields.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Jun 21 02:14:59 2019 UTC (4 years, 9 months ago) by jnemeth
Branch: MAIN
Changes since 1.78: +4 -4 lines
Diff to previous 1.78 (colored) to selected 1.69 (colored)

Add a third argument to the "cfn" function that is an argument to
gpt_change_ent().  The purpose of the third argument is to specify
whether the entry to be changed is a primary GPT entry or a secondary
GPT entry.  It is assumed that a secondary GPT entry will always
follow a corresponding primary entry.

This is in preparation for an upcoming change that will require it.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jun 20 10:41:58 2019 UTC (4 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.77: +4 -1 lines
Diff to previous 1.77 (colored) to selected 1.69 (colored)

Do not try to close a NULL gpt. Fixes the core dump part of PR bin/54312

Revision 1.74.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:33 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.74: +14 -11 lines
Diff to previous 1.74 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.77 / (download) - annotate - [select for diffs], Sun Jan 27 13:16:05 2019 UTC (5 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.76: +12 -9 lines
Diff to previous 1.76 (colored) to selected 1.69 (colored)

Fix three MBR extended partition related bugs:
 1) when walking an extended MBR chain, do not assign duplicate indices
 2) the pointer to the next MBR may be any of the MBR_PTYPE_EXT* variants
 3) the ext MBR chain links are relative to the primary extended partition,
    unlike the contained partitions which are relative to the extended MBR
    block address.

Revision 1.74.2.2 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:23 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.74.2.1: +2 -2 lines
Diff to previous 1.74.2.1 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored) to selected 1.69 (colored)

Sync with head

Revision 1.70.4.3 / (download) - annotate - [select for diffs], Mon Oct 15 08:04:04 2018 UTC (5 years, 5 months ago) by sborrill
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.70.4.2: +2 -2 lines
Diff to previous 1.70.4.2 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored) to selected 1.69 (colored)

Pull up the following revisions(s) (requested by mlelstv in ticket #1063):
	sbin/gpt/gpt.c:	revision 1.76

When changing entries, skip those that do not match the -L option.
Should fix PR 53668.

Revision 1.28.2.3 / (download) - annotate - [select for diffs], Mon Oct 15 07:55:49 2018 UTC (5 years, 5 months ago) by sborrill
Branch: netbsd-7
Changes since 1.28.2.2: +2 -2 lines
Diff to previous 1.28.2.2 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored) to selected 1.69 (colored)

Pull up the following revisions(s) (requested by mlelstv in ticket #1643):
	sbin/gpt/gpt.c:	revision 1.76

When changing entries skip those that do not match the -L option.
Should fix PR 53668.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Oct 14 20:10:49 2018 UTC (5 years, 5 months ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored) to selected 1.69 (colored)

When changing entries skip those that do not match the -L option.
Should fix PR 53668.

Revision 1.28.2.2 / (download) - annotate - [select for diffs], Mon Aug 13 16:12:12 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.28.2.1: +940 -314 lines
Diff to previous 1.28.2.1 (colored) to branchpoint 1.28 (colored) to selected 1.69 (colored)

Catch up to current for the following, requested by sborrill in ticket #1629:

	sbin/gpt/gpt_private.h                          up to 1.2
	sbin/gpt/header.c                               up to 1.9
	sbin/gpt/main.c                                 up to 1.11
	sbin/gpt/drvctl.c				delete
	sbin/gpt/Makefile				up to 1.18
	sbin/gpt/add.c					up to 1.44
	sbin/gpt/backup.c				up to 1.18
	sbin/gpt/biosboot.c				up to 1.30
	sbin/gpt/create.c				up to 1.23
	sbin/gpt/destroy.c				up to 1.10
	sbin/gpt/gpt.8					up to 1.63
	sbin/gpt/gpt.c					up to 1.75
	sbin/gpt/gpt.h					up to 1.38
	sbin/gpt/gpt_uuid.c				up to 1.15
	sbin/gpt/gpt_uuid.h				up to 1.7
	sbin/gpt/label.c				up to 1.29
	sbin/gpt/map.c					up to 1.14
	sbin/gpt/map.h					up to 1.6
	sbin/gpt/migrate.c				up to 1.33
	sbin/gpt/recover.c				up to 1.18
	sbin/gpt/remove.c				up to 1.22
	sbin/gpt/resize.c				up to 1.23
	sbin/gpt/resizedisk.c				up to 1.17
	sbin/gpt/restore.c				up to 1.18
	sbin/gpt/set.c					up to 1.14
	sbin/gpt/show.c 				up to 1.41
	sbin/gpt/type.c 				up to 1.15
	sbin/gpt/unset.c				up to 1.14

Many changes including:
- Significant refactoring
- PR/51230: Add the ability to set the active flag in the PMBR
- Let individual commands decide if ioctl(DIOCMWEDGES) should be done
- Add a "header" subcommand that displays information about the size of
  the disk along with information from the GPT header if it exists
- 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.
- Improve documentation, including booting and exit status
- Check device parameter to avoid segfaults

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:23 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jul 3 03:41:23 2018 UTC (5 years, 8 months ago) by jnemeth
Branch: MAIN
CVS Tags: pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored) to selected 1.69 (colored)

Not all things that write to the disk do something that dk(4) will
be interested in.  Let individual commands decide if ioctl(DIOCMWEDGES)
should be done.  I was conservative and set the flag on any command
that might create/modify/delete partitions in any way.

Revision 1.70.4.2 / (download) - annotate - [select for diffs], Fri May 4 16:24:46 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.70.4.1: +2 -2 lines
Diff to previous 1.70.4.1 (colored) to branchpoint 1.70 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by mrg in ticket #785):
	sbin/gpt/gpt.c: revision 1.74
	sbin/gpt/map.c: revision 1.14
	sbin/gpt/gpt.8: revision 1.53
	sbin/gpt/gpt.8: revision 1.54
	sbin/gpt/gpt.8: revision 1.55
	sbin/gpt/gpt.8: revision 1.56
	sbin/gpt/gpt.8: revision 1.57
	sbin/gpt/gpt.8: revision 1.59

Add note about bootme flag:
        The bootme flag is used to indicate which partiotion should be booted
        by UEFI boot code.

Fix a typo, and make a couple of minor wording improvements.
I resisted the (very weak) impulse to Americanise some spellings ...

Use Fx/Nx.

clarify that alignment is the number of bytes to align to.

Explain what suffixes are accepted when specifying a size.
Spelling

add information about how to boot from gpt.  mostly taken from the wiki.

if a new map entry doesn't fit, be more verbose about the sizes.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Feb 13 00:34:11 2018 UTC (6 years, 1 month ago) by sevan
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored) to selected 1.69 (colored)

Spelling

Revision 1.70.4.1 / (download) - annotate - [select for diffs], Mon Feb 12 04:05:07 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.70: +22 -8 lines
Diff to previous 1.70 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by christos in ticket #545):
	sbin/gpt/backup.c: 1.17-1.18
	sbin/gpt/biosboot.c: 1.29-1.30
	sbin/gpt/gpt.c: 1.71-1.73
	sbin/gpt/gpt.h: 1.36
	sbin/gpt/restore.c: 1.17
	sbin/gpt/show.c: 1.40-1.41
	sys/dev/dkwedge/dkwedge_gpt.c: 1.19-1.20
PR/52522: Piotr Meyer: Don't NUL terminate the gpt label name.
--
- 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.
--
use __arraycount
--
PR/52522: ent_name is not necessarily 0 terminated, so check bounds.
--
use arraycount.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Sep 7 10:23:33 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.72: +4 -3 lines
Diff to previous 1.72 (colored) to selected 1.69 (colored)

use __arraycount

Revision 1.72 / (download) - annotate - [select for diffs], Wed Sep 6 18:17:18 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.71: +21 -7 lines
Diff to previous 1.71 (colored) to selected 1.69 (colored)

- 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.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Sep 5 18:30:46 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.70: +1 -2 lines
Diff to previous 1.70 (colored) to selected 1.69 (colored)

PR/52522: Piotr Meyer: Don't NUL terminate the gpt label name.
XXX: pullup-8

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:13 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.69: +4 -2 lines
Diff to previous 1.69 (colored) next main 1.70 (colored)

Sync with HEAD

Revision 1.68.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:02 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.68.2.1: +4 -2 lines
Diff to previous 1.68.2.1 (colored) to branchpoint 1.68 (colored) next main 1.69 (colored)

Sync with HEAD

Revision 1.70 / (download) - annotate - [select for diffs], Thu Feb 16 03:32:17 2017 UTC (7 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.69: +4 -2 lines
Diff to previous 1.69 (colored)

Add -T timestamp for reproducible builds.

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:48:55 2016 UTC (7 years, 4 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.68: +3 -2 lines
Diff to previous 1.68 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.69 / (download) - annotate - [selected], Sat Sep 24 13:40:55 2016 UTC (7 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.68: +3 -2 lines
Diff to previous 1.68 (colored)

say that you need to destroy it first.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Jun 9 15:12:54 2016 UTC (7 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.67: +5 -3 lines
Diff to previous 1.67 (colored) to selected 1.69 (colored)

PR/51230: Add the ability to set the active flag in the PMBR.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Jan 8 18:59:01 2016 UTC (8 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.66: +2 -1 lines
Diff to previous 1.66 (colored) to selected 1.69 (colored)

gpt_vwarnx is printf-like.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Dec 29 16:45:04 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.65: +48 -27 lines
Diff to previous 1.65 (colored) to selected 1.69 (colored)

- add more informational messages
- handle case where last argument is an option not a device (set -l)

Revision 1.65 / (download) - annotate - [select for diffs], Sat Dec 26 13:12:16 2015 UTC (8 years, 3 months ago) by jnemeth
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored) to selected 1.69 (colored)

pretty up attribute display a bit

Revision 1.64 / (download) - annotate - [select for diffs], Sun Dec 6 00:39:26 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.63: +82 -13 lines
Diff to previous 1.63 (colored) to selected 1.69 (colored)

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.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Dec 4 16:46:24 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.62: +38 -19 lines
Diff to previous 1.62 (colored) to selected 1.69 (colored)

Fix resizedisk.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Dec 4 01:46:32 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.61: +6 -5 lines
Diff to previous 1.61 (colored) to selected 1.69 (colored)

don't print dkctl message for files
fix typo

Revision 1.61 / (download) - annotate - [select for diffs], Thu Dec 3 21:30:54 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.60: +11 -13 lines
Diff to previous 1.60 (colored) to selected 1.69 (colored)

CID 1341556: Don't leak map info

Revision 1.60 / (download) - annotate - [select for diffs], Thu Dec 3 02:16:00 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored) to selected 1.69 (colored)

Add a space.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Dec 3 02:02:43 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.58: +62 -44 lines
Diff to previous 1.58 (colored) to selected 1.69 (colored)

WARNS=6

Revision 1.58 / (download) - annotate - [select for diffs], Wed Dec 2 20:09:33 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.57: +3 -1 lines
Diff to previous 1.57 (colored) to selected 1.69 (colored)

annotate map additions with non-allocated memory.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Dec 2 20:01:44 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.56: +3 -2 lines
Diff to previous 1.56 (colored) to selected 1.69 (colored)

- check errors from map allocation
- make map_resize return -1 instead of 0, and handle errors locally
  explaining what's going wrong

Revision 1.56 / (download) - annotate - [select for diffs], Wed Dec 2 12:20:52 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored) to selected 1.69 (colored)

Always set NOSYNC if regular file, even if we got the size from the command
line.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Dec 2 10:19:58 2015 UTC (8 years, 3 months ago) by jnemeth
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored) to selected 1.69 (colored)

- dereferencing NULL is generally bad, found by visual inspection
- automatically set nosync when opening a file to avoid spurious errors

Revision 1.54 / (download) - annotate - [select for diffs], Wed Dec 2 04:17:25 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.53: +13 -3 lines
Diff to previous 1.53 (colored) to selected 1.69 (colored)

print the old and the new style usage.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Dec 2 04:07:11 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.52: +18 -16 lines
Diff to previous 1.52 (colored) to selected 1.69 (colored)

refactor the utf code so that it does not leak memory.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Dec 1 23:29:07 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.51: +77 -50 lines
Diff to previous 1.51 (colored) to selected 1.69 (colored)

merge command line parsers and check all memory allocations.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Dec 1 19:25:24 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.50: +390 -18 lines
Diff to previous 1.50 (colored) to selected 1.69 (colored)

refactor more duplicated code.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 1 16:32:19 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.49: +23 -1 lines
Diff to previous 1.49 (colored) to selected 1.69 (colored)

Refactor the command dispatching and help printing logic.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Dec 1 09:05:33 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.48: +298 -155 lines
Diff to previous 1.48 (colored) to selected 1.69 (colored)

Firs step of refactoring, remove all globals, factor out some common code,
handle alternate usage but not advertise it.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Dec 1 02:03:55 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.47: +13 -3 lines
Diff to previous 1.47 (colored) to selected 1.69 (colored)

- use gpt_msg to print informational messages (perhaps these should be printed
  only with -v)
- don't print any messages with gpt_msg if quiet
- print a message if we didn't reconfigure the wedges

Revision 1.47 / (download) - annotate - [select for diffs], Tue Dec 1 01:49:23 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.46: +6 -3 lines
Diff to previous 1.46 (colored) to selected 1.69 (colored)

only update the wedge information if it is supported.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Nov 30 19:59:34 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.45: +15 -175 lines
Diff to previous 1.45 (colored) to selected 1.69 (colored)

- automatically sync the wedge information unless -n is specified.
- document the general options in the traditional way.
- split the main program into a separate file.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Nov 29 14:03:35 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.44: +9 -7 lines
Diff to previous 1.44 (colored) to selected 1.69 (colored)

Do division once

Revision 1.44 / (download) - annotate - [select for diffs], Sun Nov 29 13:46:23 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.43: +30 -16 lines
Diff to previous 1.43 (colored) to selected 1.69 (colored)

Only use the ioctl's if we have them.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Nov 29 13:24:28 2015 UTC (8 years, 4 months ago) by jnemeth
Branch: MAIN
Changes since 1.42: +18 -28 lines
Diff to previous 1.42 (colored) to selected 1.69 (colored)

fix build breakage for systems that do not have DIOCG{SECTOR,MEDIA}SIZE

Revision 1.42 / (download) - annotate - [select for diffs], Sun Nov 29 00:14:46 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.41: +79 -40 lines
Diff to previous 1.41 (colored) to selected 1.69 (colored)

merge the create errors in one place and fix them.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Nov 3 02:19:24 2015 UTC (8 years, 4 months ago) by jnemeth
Branch: MAIN
Changes since 1.40: +8 -6 lines
Diff to previous 1.40 (colored) to selected 1.69 (colored)

Add a "header" subcommand that displays information about the size of
the disk along with information from the GPT header if it exists.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Tue Jun 2 19:49:38 2015 UTC (8 years, 9 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.28: +103 -240 lines
Diff to previous 1.28 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by jnemeth in ticket #774):
	sbin/gpt/Makefile: revisions 1.9-1.13
	sbin/gpt/add.c: revisions 1.25-1.27
	sbin/gpt/backup.c: revisions 1.2-1.8
	sbin/gpt/biosboot.c: revisions 1.8-1.14
	sbin/gpt/create.c: revisions 1.8-1.12
	sbin/gpt/destroy.c: revisions 1.5-1.6
	sbin/gpt/drvctl.c: revision 1.1
	sbin/gpt/gpt.8: revisions 1.29-1.36
	sbin/gpt/gpt.c: revisions 1.29-1.40
	sbin/gpt/gpt.h: revisions 1.12-1.18
	sbin/gpt/gpt_uuid.c: revisions 1.1-1.10
	sbin/gpt/gpt_uuid.h: revisions 1.1-1.3
	sbin/gpt/label.c: revisions 1.15-1.18
	sbin/gpt/map.c: revision 1.7
	sbin/gpt/migrate.c: revisions 1.15-1.21
	sbin/gpt/recover.c: revision 1.5
	sbin/gpt/remove.c: revisions 1.13-1.16
	sbin/gpt/resize.c: revisions 1.9-1.11
	sbin/gpt/resizedisk.c: revisions 1.1-1.6
	sbin/gpt/restore.c: revisions 1.2-1.7
	sbin/gpt/set.c: revisions 1.3-1.5
	sbin/gpt/show.c: revision 1.16-1.21
	sbin/gpt/type.c: revisions 1.1-1.6
	sbin/gpt/unset.c: revisions 1.3-1.5
- record the sector size of the disk
- correct confusion with end_cylinder and end_sector in MBRs
--
- dump all partitions, not just ones that are in use
- while here, squash a memory leak
     It shouldn't be necessary to backup unused partitions, however
the partition GUID is created at the time the GPT is created and
is never changed.  It shouldn't matter if the GUID of an unused
partition changes, but there may be some special case where it
does.  Since it isn't a big deal to record the unused partitions,
might as well do it.
--
Initial cut of gpt restore.  This functions correctly in testing,
but isn't all that pretty.  It has minimal error testing and may
leak memory.  It also only works with empty disks.  If passed "-F"
flag, it will blank the disk for you.
--
document the new restore subcommand
--
- make gpt_gpt() available for use directly by subcommands
- create new resizedisk disk subcommand for relocating backup GPT
--
Fix compile error observed on i386. Use PRIu64.
--
no C99isms in tool code
--
- handle a GPT that isn't an exact multiple of a sector
- adjust PMBR size, in case new disk is a different size
- don't leak as much memory
- clean up error handling somewhat
--
PR/44218 - David Young -- add "type" subcommand to change a partition type
--
PR/47990 - Dr. Wolfgang Stukenbrock -- add "-L <label>" as selector option
--
minor toolification: need libprop...
--
more toolification
--
more toolification changes
--
remove compat defines.
--
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.
--
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.
--
correctly show partition type in the new world order
--
actually return the uuid when parsing one that is in numeric format
--
using random values for hdr->hdr_guid does not work very well
--
oops, forgot to update end of data area
--
It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H
--
Fix tools build on !NetBSD.
--
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.
--
"0" is not guaranteed to be unique
--
provide a copy of the kernel uuid generator (with portable API calls) for
tools.
--
Allow specifying sector and media size on the command line.
--
Remove trailing whitespace.
--
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
--
Paranoia: choke noisily on EOF from /dev/urandom.
--
Report the argument instead of (null) when opendisk fails.
--
handle constness
--
handle constness better
--
Add some more common partition types.
--
Bump date for previous.
--
Fix handling of -t option for the type command.
Match any type, when no option is given, just like for the label command.
--
Factor out the getdisksize() drvctl method, and provide an alternative that
directly uses the disk ioctl's instead of relying on the drvctl device driver
which is currently not mandatory.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Dec 29 16:27:06 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.39: +3 -99 lines
Diff to previous 1.39 (colored) to selected 1.69 (colored)

Factor out the getdisksize() drvctl method, and provide an alternative that
directly uses the disk ioctl's instead of relying on the drvctl device driver
which is currently not mandatory.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Nov 17 07:15:28 2014 UTC (9 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.38: +3 -4 lines
Diff to previous 1.38 (colored) to selected 1.69 (colored)

handle constness better

Revision 1.38 / (download) - annotate - [select for diffs], Mon Nov 17 07:13:42 2014 UTC (9 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.37: +3 -2 lines
Diff to previous 1.37 (colored) to selected 1.69 (colored)

handle constness

Revision 1.37 / (download) - annotate - [select for diffs], Mon Nov 17 07:11:18 2014 UTC (9 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored) to selected 1.69 (colored)

Report the argument instead of (null) when opendisk fails.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Oct 4 01:00:42 2014 UTC (9 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.35: +74 -58 lines
Diff to previous 1.35 (colored) to selected 1.69 (colored)

Allow specifying sector and media size on the command line.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Oct 2 19:15:21 2014 UTC (9 years, 5 months ago) by joerg
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored) to selected 1.69 (colored)

Fix tools build on !NetBSD.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Sep 30 17:59:59 2014 UTC (9 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.33: +8 -104 lines
Diff to previous 1.33 (colored) to selected 1.69 (colored)

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 1.33 / (download) - annotate - [select for diffs], Tue Sep 30 02:12:55 2014 UTC (9 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored) to selected 1.69 (colored)

remove compat defines.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Sep 29 21:04:34 2014 UTC (9 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.31: +28 -4 lines
Diff to previous 1.31 (colored) to selected 1.69 (colored)

more toolification

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 29 20:28:57 2014 UTC (9 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.30: +5 -1 lines
Diff to previous 1.30 (colored) to selected 1.69 (colored)

minor toolification: need libprop...

Revision 1.30 / (download) - annotate - [select for diffs], Sun Sep 28 08:14:51 2014 UTC (9 years, 6 months ago) by jnemeth
Branch: MAIN
Changes since 1.29: +10 -2 lines
Diff to previous 1.29 (colored) to selected 1.69 (colored)

PR/44218 - David Young -- add "type" subcommand to change a partition type

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 23 07:47:54 2014 UTC (9 years, 6 months ago) by jnemeth
Branch: MAIN
Changes since 1.28: +7 -4 lines
Diff to previous 1.28 (colored) to selected 1.69 (colored)

- make gpt_gpt() available for use directly by subcommands
- create new resizedisk disk subcommand for relocating backup GPT

Revision 1.17.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:25 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.17.2.2: +34 -66 lines
Diff to previous 1.17.2.2 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored) to selected 1.69 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Aug 10 18:27:15 2014 UTC (9 years, 7 months ago) by jnemeth
Branch: MAIN
CVS Tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.27: +6 -3 lines
Diff to previous 1.27 (colored) to selected 1.69 (colored)

Add restore subcommand.

XXX It does not actually work yet.  It is being committed now to make
later pullups easier.

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:37:28 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.15.2.2: +44 -77 lines
Diff to previous 1.15.2.2 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored) to selected 1.69 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 19 06:46:51 2013 UTC (10 years, 3 months ago) by jnemeth
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Changes since 1.26: +7 -4 lines
Diff to previous 1.26 (colored) to selected 1.69 (colored)

Add the backup subcommand.  It dumps the contents of the partition
tables as a plist, which is readable by the restore subcommand.

XXX restore subcommand forthcoming

Revision 1.26 / (download) - annotate - [select for diffs], Mon Dec 9 08:03:17 2013 UTC (10 years, 3 months ago) by jnemeth
Branch: MAIN
Changes since 1.25: +10 -3 lines
Diff to previous 1.25 (colored) to selected 1.69 (colored)

Add two new subcommands, "set" and "unset".  These were inspired by
FreeBSD's gpart(8), but the code is all mine.  The purpose of these
is to set and unset partition attributes.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Dec 4 20:15:51 2013 UTC (10 years, 3 months ago) by jakllsch
Branch: MAIN
Changes since 1.24: +7 -6 lines
Diff to previous 1.24 (colored) to selected 1.69 (colored)

Use MBR_PTYPE_ defines from <sys/bootblock.h>.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Nov 27 01:47:53 2013 UTC (10 years, 4 months ago) by jnemeth
Branch: MAIN
Changes since 1.23: +1 -55 lines
Diff to previous 1.23 (colored) to selected 1.69 (colored)

Remove FreeBSD specific code as per message to tech-userlevel.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Nov 23 08:59:04 2013 UTC (10 years, 4 months ago) by jnemeth
Branch: MAIN
Changes since 1.22: +5 -2 lines
Diff to previous 1.22 (colored) to selected 1.69 (colored)

Only skip past _PATH_DEV if it is actually present.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 20 08:08:47 2013 UTC (10 years, 4 months ago) by jnemeth
Branch: MAIN
Changes since 1.21: +5 -2 lines
Diff to previous 1.21 (colored) to selected 1.69 (colored)

Add a resize command.  This command was inspired by FreeBSD's gpart(8),
but the code was written by myself.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Nov 19 05:03:41 2013 UTC (10 years, 4 months ago) by jnemeth
Branch: MAIN
Changes since 1.20: +6 -4 lines
Diff to previous 1.20 (colored) to selected 1.69 (colored)

     Add two new options to the "add" subcommand:

-a alignment -- attempt to align the start and size of the partition
-l label -- supply a label for the partition

These options were inspired by FreeBSD's gpart(8) command, but the
code was written by me.

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:28:51 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.17.2.1: +15 -13 lines
Diff to previous 1.17.2.1 (colored) to branchpoint 1.17 (colored) to selected 1.69 (colored)

resync from head

Revision 1.20 / (download) - annotate - [select for diffs], Sat Apr 13 18:32:01 2013 UTC (10 years, 11 months ago) by jakllsch
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.19: +13 -13 lines
Diff to previous 1.19 (colored) to selected 1.69 (colored)

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.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Apr 13 18:04:33 2013 UTC (10 years, 11 months ago) by jakllsch
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored) to selected 1.69 (colored)

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.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:28:08 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored) to selected 1.69 (colored)

resync with head

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Wed Jan 23 00:05:31 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.15.2.1: +2 -2 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored) to selected 1.69 (colored)

sync with head

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jan 18 17:58:15 2013 UTC (11 years, 2 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-pagecache-base8, agc-symver-base, agc-symver
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored) to selected 1.69 (colored)

Now that GPT_ENT_TYPE_LINUX_DATA is diffrent from the Windows one, use it.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:27 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.15: +7 -5 lines
Diff to previous 1.15 (colored) to selected 1.69 (colored)

sync with head

Revision 1.15.4.1 / (download) - annotate - [select for diffs], Fri Oct 26 09:02:27 2012 UTC (11 years, 5 months ago) by sborrill
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Changes since 1.15: +7 -5 lines
Diff to previous 1.15 (colored) next main 1.16 (colored) to selected 1.69 (colored)

Pull up the following revisions(s) (requested by riz in ticket #619):
	sbin/gpt/gpt.c:	revision 1.16-1.17

Endianness fixes.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 30 00:53:59 2012 UTC (11 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored) to selected 1.69 (colored)

Fix a few straggling BE/LE problems.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 25 01:07:49 2012 UTC (11 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.15: +7 -5 lines
Diff to previous 1.15 (colored) to selected 1.69 (colored)

Make sure utf-16 strings are written as little endian words.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Aug 27 17:38:16 2011 UTC (12 years, 7 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache, netbsd-6
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored) to selected 1.69 (colored)

Use __dead

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 6 16:30:40 2011 UTC (13 years, 2 months ago) by jakllsch
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.13: +8 -1 lines
Diff to previous 1.13 (colored) to selected 1.69 (colored)

UFS is called FFS in the NetBSD case.  Display as such and accept as input.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jan 6 01:08:48 2011 UTC (13 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.12: +5 -2 lines
Diff to previous 1.12 (colored) to selected 1.69 (colored)

Support booting from GPT-partioned disks on PC-BIOS-compatible systems.

Much of the work in this commit was done by Mike Volokhov during GSoC 2009.

Revision 1.8.6.2 / (download) - annotate - [select for diffs], Wed Nov 24 19:12:44 2010 UTC (13 years, 4 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.8.6.1: +3 -2 lines
Diff to previous 1.8.6.1 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by christos in ticket #1464):
	sbin/gpt/gpt.c: revision 1.11
	sbin/gpt/gpt.c: revision 1.12
PR/43105: Peter Kerwien: Destroying a GPT partition with dd will cause gpt
destroy / create to fail. When reading the GPT label from the end of the disk
ignore errors if the GPT label at the beginning of the disk was not found.
fix printf format.

Revision 1.8.6.1 / (download) - annotate - [select for diffs], Sun Nov 21 21:59:38 2010 UTC (13 years, 4 months ago) by riz
Branch: netbsd-5
Changes since 1.8: +16 -9 lines
Diff to previous 1.8 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by christos in ticket #1464):
	sbin/gpt/gpt.c: revision 1.11
PR/43105: Peter Kerwien: Destroying a GPT partition with dd will cause gpt
destroy / create to fail. When reading the GPT label from the end of the disk
ignore errors if the GPT label at the beginning of the disk was not found.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Apr 2 19:33:09 2010 UTC (13 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored) to selected 1.69 (colored)

fix printf format.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 2 13:36:59 2010 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.10: +16 -9 lines
Diff to previous 1.10 (colored) to selected 1.69 (colored)

PR/43105: Peter Kerwien: Destroying a GPT partition with dd will cause gpt
destroy / create to fail. When reading the GPT label from the end of the disk
ignore errors if the GPT label at the beginning of the disk was not found.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Feb 20 08:47:10 2010 UTC (14 years, 1 month ago) by mlelstv
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored) to selected 1.69 (colored)

Initialize device_name before opendisk to avoid
"unable to open device '(null)'" error messages
when the opendisk fails.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Feb 7 18:12:22 2009 UTC (15 years, 1 month ago) by uebayasi
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored) to selected 1.69 (colored)

Let 'gpt add' suggest a collect device name so that opendisk(3) called by
dkctl(8) succeeds.

Revision 1.2.2.1.2.1 / (download) - annotate - [select for diffs], Tue Jun 3 20:47:12 2008 UTC (15 years, 9 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.2.2.1: +56 -7 lines
Diff to previous 1.2.2.1 (colored) next main 1.2.2.2 (colored) to selected 1.69 (colored)

Sync with netbsd-4.

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Tue Apr 8 20:42:05 2008 UTC (15 years, 11 months ago) by jdc
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.2.2.2: +26 -4 lines
Diff to previous 1.2.2.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored) to selected 1.69 (colored)

Pull up revisions:
  src/sbin/gpt/add.c			1.6
  src/sbin/gpt/gpt.c			1.7
  src/sbin/gpt/show.c			1.4
  src/sys/dev/dkwedge/dkwedge_gpt.c	1.7
  src/sys/sys/disk.h			1.47
  src/sys/sys/disklabel_gpt.h		1.4
(requested by riz in ticket #1119).

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.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Tue Apr 8 20:32:38 2008 UTC (15 years, 11 months ago) by jdc
Branch: netbsd-4
Changes since 1.2.2.1: +31 -4 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) to selected 1.69 (colored)

Pull up revisions:
  src/sbin/gpt/add.c		1.5
  src/sbin/gpt/create.c		1.3
  src/sbin/gpt/destroy.c	1.3
  src/sbin/gpt/gpt.c		1.4-1.6
  src/sbin/gpt/label.c		1.5-1.6
  src/sbin/gpt/migrate.c	1.4
  src/sbin/gpt/recover.c	1.3
  src/sbin/gpt/remove.c		1.4
  src/sbin/gpt/show.c		1.3
(requested by riz in ticket #1117).

Produce more useful error messages.

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...

Your friendly neighborhood 64-bit architecture here to remind you that
strlen returns size_t, and printf's precision specifier uses int.

Revision 1.7.4.1 / (download) - annotate - [select for diffs], Thu Apr 3 13:54:10 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.7: +8 -1 lines
Diff to previous 1.7 (colored) next main 1.8 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:14:49 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.7: +8 -1 lines
Diff to previous 1.7 (colored) next main 1.8 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.4.4.2 / (download) - annotate - [select for diffs], Sun Mar 23 00:44:24 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.4.4.1: +8 -1 lines
Diff to previous 1.4.4.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.69 (colored)

sync with HEAD

Revision 1.8 / (download) - annotate - [select for diffs], Sun Feb 24 18:38:10 2008 UTC (16 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-armv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Branch point for: netbsd-5
Changes since 1.7: +8 -1 lines
Diff to previous 1.7 (colored) to selected 1.69 (colored)

PR/38094: Robert Millan: support "BIOS Boot" partition type in gpt(8)

Revision 1.4.6.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:04:17 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.4.6.1: +26 -4 lines
Diff to previous 1.4.6.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.4.4.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:38:06 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.4: +52 -6 lines
Diff to previous 1.4 (colored) to selected 1.69 (colored)

sync with HEAD

Revision 1.7 / (download) - annotate - [select for diffs], Fri Dec 28 19:53:10 2007 UTC (16 years, 3 months ago) by riz
Branch: MAIN
CVS Tags: mjf-devfs-base, matt-armv6-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.6: +26 -4 lines
Diff to previous 1.6 (colored) to selected 1.69 (colored)

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.

Revision 1.4.6.1 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:57 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.4: +27 -3 lines
Diff to previous 1.4 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Dec 19 05:48:33 2007 UTC (16 years, 3 months ago) by dogcow
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored) to selected 1.69 (colored)

Your friendly neighborhood 64-bit architecture here to remind you that
strlen returns size_t, and printf's precision specifier uses int.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 18 21:46:46 2007 UTC (16 years, 3 months ago) by riz
Branch: MAIN
Changes since 1.4: +27 -3 lines
Diff to previous 1.4 (colored) to selected 1.69 (colored)

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...

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 11 04:22:00 2007 UTC (16 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: mjf-devfs, matt-armv6
Changes since 1.3: +5 -2 lines
Diff to previous 1.3 (colored) to selected 1.69 (colored)

Produce more useful error messages.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Tue Feb 20 15:14:00 2007 UTC (17 years, 1 month ago) by tron
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Branch point for: wrstuden-fixsa
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by riz in ticket #445):
	sbin/gpt/add.c: revision 1.4
	sbin/gpt/remove.c: revision 1.3
	sbin/gpt/label.c: revision 1.4
	sbin/gpt/gpt.c: revision 1.3
Use strtoll() when converting a 64-bit quantity.  This makes "gpt add"
work with an offset of more than 2147483647 sectors.  While I'm here,
use strtoul() when converting an unsigned quantity.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Feb 16 17:13:02 2007 UTC (17 years, 1 month ago) by riz
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored) to selected 1.69 (colored)

Use strtoll() when converting a 64-bit quantity.  This makes "gpt add"
work with an offset of more than 2147483647 sectors.  While I'm here,
use strtoul() when converting an unsigned quantity.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Oct 15 22:36:29 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.1: +112 -6 lines
Diff to previous 1.1 (colored) to selected 1.69 (colored)

Make this work under NetBSD.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Oct 15 22:34:17 2006 UTC (17 years, 5 months ago) by christos
Branch: FreeBSD
CVS Tags: GPT20061015
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.69 (colored)

Import the gpt tool from FreeBSD

Revision 1.1 / (download) - annotate - [select for diffs], Sun Oct 15 22:34:17 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Diff to selected 1.69 (colored)

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>