History log of /netbsd-current/sbin/gpt/remove.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.23 21-Jun-2019 jnemeth

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 tags: phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728
# 1.22 03-Jul-2018 jnemeth

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 tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.21 03-Dec-2015 christos

branches: 1.21.14; 1.21.16;
eliminate static globals so that commands can be re-used.


# 1.20 01-Dec-2015 christos

refactor more duplicated code.


# 1.19 01-Dec-2015 christos

Refactor the command dispatching and help printing logic.


# 1.18 01-Dec-2015 christos

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


# 1.17 29-Nov-2015 christos

merge the create errors in one place and fix them.


# 1.16 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 30-Sep-2014 christos

remove compat defines.


# 1.14 29-Sep-2014 christos

minor toolification: need libprop...


# 1.13 29-Sep-2014 jnemeth

PR/47990 - Dr. Wolfgang Stukenbrock -- add "-L <label>" as selector option


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.12 28-Nov-2013 jnemeth

branches: 1.12.4;
when calling dehumanize_number() make sure the resulting number is >= 1


# 1.11 27-Nov-2013 jnemeth

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


# 1.10 22-Nov-2013 jnemeth

change the "-b blocknr" parameter to accept a "human number"


# 1.9 22-Nov-2013 jnemeth

In the manpage:
- s/-b number/-b blocknr/
- s/-s count/-s sectors/
- s/-p count/-p partitions/

In the program:
- s/-b lba/-b blocknr/
- s/-s lba/-s sectors/

This makes the documentation in the manpage and the program consistent
and makes it more clear what the parameters are. Also, "-s lba" was
just plain wrong since LBA stands for Logical Block Address[ing], and
the -s option didn't represent any kind of address, but rather a size.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.8 13-Apr-2013 jakllsch

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.


# 1.7 13-Apr-2013 jakllsch

Use correct spelling of "secondary" in comments.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.6 27-Aug-2011 joerg

branches: 1.6.2; 1.6.8;
Use __dead


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.5 07-Feb-2009 uebayasi

Make manual and usage consistent. No functional changes.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base matt-armv6-nbase mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.4 18-Dec-2007 riz

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 tags: matt-armv6-prevmlocking cube-autoconf-base matt-mips64-base
# 1.3 16-Feb-2007 riz

branches: 1.3.4; 1.3.6;
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 tags: netbsd-4-base
# 1.2 15-Oct-2006 christos

branches: 1.2.2;
Make this work under NetBSD.


# 1.1 15-Oct-2006 christos

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728
# 1.22 03-Jul-2018 jnemeth

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 tags: 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.21 03-Dec-2015 christos

branches: 1.21.14;
eliminate static globals so that commands can be re-used.


# 1.20 01-Dec-2015 christos

refactor more duplicated code.


# 1.19 01-Dec-2015 christos

Refactor the command dispatching and help printing logic.


# 1.18 01-Dec-2015 christos

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


# 1.17 29-Nov-2015 christos

merge the create errors in one place and fix them.


# 1.16 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 30-Sep-2014 christos

remove compat defines.


# 1.14 29-Sep-2014 christos

minor toolification: need libprop...


# 1.13 29-Sep-2014 jnemeth

PR/47990 - Dr. Wolfgang Stukenbrock -- add "-L <label>" as selector option


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.12 28-Nov-2013 jnemeth

branches: 1.12.4;
when calling dehumanize_number() make sure the resulting number is >= 1


# 1.11 27-Nov-2013 jnemeth

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


# 1.10 22-Nov-2013 jnemeth

change the "-b blocknr" parameter to accept a "human number"


# 1.9 22-Nov-2013 jnemeth

In the manpage:
- s/-b number/-b blocknr/
- s/-s count/-s sectors/
- s/-p count/-p partitions/

In the program:
- s/-b lba/-b blocknr/
- s/-s lba/-s sectors/

This makes the documentation in the manpage and the program consistent
and makes it more clear what the parameters are. Also, "-s lba" was
just plain wrong since LBA stands for Logical Block Address[ing], and
the -s option didn't represent any kind of address, but rather a size.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.8 13-Apr-2013 jakllsch

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.


# 1.7 13-Apr-2013 jakllsch

Use correct spelling of "secondary" in comments.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.6 27-Aug-2011 joerg

branches: 1.6.2; 1.6.8;
Use __dead


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.5 07-Feb-2009 uebayasi

Make manual and usage consistent. No functional changes.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base matt-armv6-nbase mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.4 18-Dec-2007 riz

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 tags: matt-armv6-prevmlocking cube-autoconf-base matt-mips64-base
# 1.3 16-Feb-2007 riz

branches: 1.3.4; 1.3.6;
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 tags: netbsd-4-base
# 1.2 15-Oct-2006 christos

branches: 1.2.2;
Make this work under NetBSD.


# 1.1 15-Oct-2006 christos

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.21 03-Dec-2015 christos

eliminate static globals so that commands can be re-used.


# 1.20 01-Dec-2015 christos

refactor more duplicated code.


# 1.19 01-Dec-2015 christos

Refactor the command dispatching and help printing logic.


# 1.18 01-Dec-2015 christos

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


# 1.17 29-Nov-2015 christos

merge the create errors in one place and fix them.


# 1.16 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 30-Sep-2014 christos

remove compat defines.


# 1.14 29-Sep-2014 christos

minor toolification: need libprop...


# 1.13 29-Sep-2014 jnemeth

PR/47990 - Dr. Wolfgang Stukenbrock -- add "-L <label>" as selector option


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.12 28-Nov-2013 jnemeth

branches: 1.12.4;
when calling dehumanize_number() make sure the resulting number is >= 1


# 1.11 27-Nov-2013 jnemeth

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


# 1.10 22-Nov-2013 jnemeth

change the "-b blocknr" parameter to accept a "human number"


# 1.9 22-Nov-2013 jnemeth

In the manpage:
- s/-b number/-b blocknr/
- s/-s count/-s sectors/
- s/-p count/-p partitions/

In the program:
- s/-b lba/-b blocknr/
- s/-s lba/-s sectors/

This makes the documentation in the manpage and the program consistent
and makes it more clear what the parameters are. Also, "-s lba" was
just plain wrong since LBA stands for Logical Block Address[ing], and
the -s option didn't represent any kind of address, but rather a size.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.8 13-Apr-2013 jakllsch

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.


# 1.7 13-Apr-2013 jakllsch

Use correct spelling of "secondary" in comments.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.6 27-Aug-2011 joerg

branches: 1.6.2; 1.6.8;
Use __dead


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.5 07-Feb-2009 uebayasi

Make manual and usage consistent. No functional changes.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base matt-armv6-nbase mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.4 18-Dec-2007 riz

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 tags: matt-armv6-prevmlocking cube-autoconf-base matt-mips64-base
# 1.3 16-Feb-2007 riz

branches: 1.3.4; 1.3.6;
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 tags: netbsd-4-base
# 1.2 15-Oct-2006 christos

branches: 1.2.2;
Make this work under NetBSD.


# 1.1 15-Oct-2006 christos

branches: 1.1.1;
Initial revision