Home | History | Annotate | Download | only in dkwedge
History log of /src/sys/dev/dkwedge/dkwedge_bsdlabel.c
RevisionDateAuthorComments
 1.25  11-Apr-2020  jdolecek allocate buffer for disk I/O via geteblk() instead of malloc(), so they
are properly aligned; e.g. readdisklabel() does the same

also removed the DKW_MALLOC()/DKW_FREE()/DKW_REALLOC() macros as apparently
unnecessary, these files don't seem to be compiled into any userland tools

dkwedge_gpt.c confirmed working, others compile-tested only
 1.24  09-Jul-2019  maxv branches: 1.24.8;
Fix info leak: always clear 'dkw', because some of its (otherwise
uninitialized) fields can be copied to userland, typically in the
DIOCGWEDGEINFO ioctl.
 1.23  04-Nov-2014  mlelstv branches: 1.23.20;
Handle disks with non DEV_BSIZE sectors.
 1.22  30-Aug-2014  apb When converting a disklabel partition type integer to a wedge partition
type string, use the strings defined in DKW_PTYPE_* in <sys/disk.h>, not
the strings defined in FSTYPE_DEFN in <sys/disklabel.h>.

This corrects a problem introduced in revision 1.21 dated 2014-08-18.
That change was intended to add additional case to the list, but it
accidentally also changed from the strings in the DKW_PTYPE_* macros to
the strings in the FSTYPE_DEFN macro. Many of the strings are the same,
but there are differences such as "RAID" versus "raidframe" and "MSDOS"
versus "FAT".

XXX: There seems to be no good reason for the differences in string
names for partition types. One or both of the lists should probably be
edited to align them.
 1.21  18-Aug-2014  apb Use FSTYPE_DEFN from <sys/disklabel.h> to generate case branches for
conversions from all known disklabel fstypes to strings. This replaces
the hand-coded list of conversions for only a few of the known types.
 1.20  18-Aug-2014  apb Don't ignore unrecognised partition types in BSD disklabels;
instead, add them with wedge partition type "unknown#%u", where
%u is the underlying numeric partition type from the BSD disklabel.
 1.19  31-Mar-2014  martin branches: 1.19.4;
Bring back the playstation2 port - now that a toolchain for it is
available again.
 1.18  24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.17  07-Jun-2012  mlelstv branches: 1.17.2; 1.17.4;
Use the label's packname to create wedge names instead of the classic
device names. Fall back to classic device names when the label has an
empty name or the default name 'fictitious'.
 1.16  05-Dec-2009  pooka branches: 1.16.12; 1.16.18;
Remove support for NetBSD/playstation2.
 1.15  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.14  09-Jun-2007  dyoung branches: 1.14.28; 1.14.30; 1.14.32;
Reduce code duplication in validate_label(). Extract some lengthy
code to give it 8 more columns of horizontal space, creating
addwedges() in this way.
 1.13  08-Apr-2007  scw Remove support for NetBSD/{,evb}sh5.
 1.12  04-Mar-2007  christos branches: 1.12.2; 1.12.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11  01-Mar-2007  martin Make this compilable from userland
 1.10  01-Mar-2007  martin Split the disklabel checksum function into two, so we can pass the
length separately.
Use this for foreign-endianess labels in wedge autodiscovery, and
calculate the checksum of those before we swap various fields in the
label.
 1.9  16-Nov-2006  christos branches: 1.9.2; 1.9.4; 1.9.8;
__unused removal on arguments; approved by core.
 1.8  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.7  13-Aug-2006  martin branches: 1.7.2; 1.7.4;
Backout previous - it is already dealt with at the config level.
 1.6  13-Aug-2006  martin Make the discovery methods optional (as they were already declared
in conf/files)
 1.5  25-Feb-2006  christos As core requested, remove vinum
 1.4  11-Dec-2005  christos branches: 1.4.2; 1.4.4; 1.4.6;
merge ktrace-lwp.
 1.3  27-Feb-2005  perry branches: 1.3.4;
nuke trailing whitespace
 1.2  23-Oct-2004  thorpej branches: 1.2.4; 1.2.6;
Check d_magic2 once, and not d_magic twice. Pointed out by tsarna.
 1.1  04-Oct-2004  thorpej branches: 1.1.2;
Add a parsing module for 4.4BSD/NetBSD disklabels. This module supports
disklabels nested inside an MBR "NetBSD" or "386BSD" partition (first
one found is considered authoritative for the disk), or in one of several
known locations for various NetBSD platforms. It can read native or other-
endian disklabels (code is there, but not tested).

If you want to play with this, exercise caution; you can't currently
mountroot on a wedge (setroot() needs some work). Enabled by the
DKWEDGE_METHOD_BSDLABEL kernel option.
 1.1.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.3  02-Nov-2004  skrll Sync with HEAD.
 1.1.2.2  19-Oct-2004  skrll Sync with HEAD
 1.1.2.1  04-Oct-2004  skrll file dkwedge_bsdlabel.c was added on branch ktrace-lwp on 2004-10-19 15:56:45 +0000
 1.2.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.2.4.1  29-Apr-2005  kent sync with -current
 1.3.4.3  03-Sep-2007  yamt sync with head.
 1.3.4.2  30-Dec-2006  yamt sync with head.
 1.3.4.1  21-Jun-2006  yamt sync with head.
 1.4.6.1  22-Apr-2006  simonb Sync with head.
 1.4.4.1  09-Sep-2006  rpaulo sync with head
 1.4.2.1  01-Mar-2006  yamt sync with head.
 1.7.4.2  10-Dec-2006  yamt sync with head.
 1.7.4.1  22-Oct-2006  yamt sync with head
 1.7.2.1  18-Nov-2006  ad Sync with head.
 1.9.8.1  03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.9.4.2  15-Apr-2007  yamt sync with head.
 1.9.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.9.2.1  19-Jul-2007  liamjfoy Pull up following revision(s) (requested by soren in ticket #774):
build.sh: revision 1.169
gnu/usr.bin/gcc4/backend/Makefile: revision 1.9
sys/arch/evbsh5/README: revision 1.1
distrib/notes/common/contents: revision 1.124
usr.sbin/ndbootd/ndbootd.c: revision 1.12
gnu/lib/libopcodes/arch/sh3eb/defs.mk: revision 1.4
gnu/lib/libbfd/arch/sh3eb/defs.mk: revision 1.8
libexec/ld.elf_so/Makefile: revision 1.78
gnu/dist/binutils/bfd/config.bfd: revision 1.14
doc/HACKS: revision 1.93
distrib/cdrom/current.conf: revision 1.8
gnu/lib/libgcc4/Makefile.inc: revision 1.6
share/mk/sys.mk: revision 1.90
distrib/sets/lists/base/mi: revision 1.700
libexec/ld.elf_so/rtld.c: revision 1.112
distrib/sets/lists/base/mi: revision 1.702
sys/arch/sh5/README: revision 1.1
gnu/lib/libbfd/arch/sh3el/bfd.h: revision 1.7
usr.sbin/traceroute/traceroute.c: revision 1.69
distrib/notes/common/main: revision 1.330
distrib/notes/common/list-setsizes.sh: revision 1.2
sys/arch/Makefile: revision 1.35
gnu/lib/libopcodes/arch/sh3el/defs.mk: revision 1.4
gnu/lib/libbfd/arch/sh3el/defs.mk: revision 1.8
share/mk/bsd.own.mk: revision 1.495
gnu/lib/libbfd/arch/sh3eb/bfd.h: revision 1.7
x11/lib/OSmesa/Makefile: revision 1.20
sys/dev/dkwedge/dkwedge_bsdlabel.c: revision 1.13
gnu/dist/binutils/opcodes/configure.in: revision 1.2
gnu/dist/binutils/opcodes/configure: revision 1.2
gnu/usr.bin/send-pr/categories: revision 1.53
etc/mtree/NetBSD.dist: revision 1.339
sys/arch/README: revision 1.42
lib/libc/gdtoa/Makefile.inc: revision 1.6
usr.bin/crunch/crunchide/Makefile: revision 1.16
sys/lkm/net/bsdcomp/Makefile: revision 1.5
regress/sys/uvm/Makefile: revision 1.6
etc/MAKEDEV.awk: revision 1.18
x11/Xserver/GL/GLcore/Makefile.GLcore: revision 1.10
sys/contrib/dev/ath/netbsd/Makefile.ath.inc: revision 1.14
gnu/lib/libbfd/Makefile: revision 1.42
doc/RESPONSIBLE: revision 1.78
Remove evbsh5.
 1.12.4.1  11-Jul-2007  mjf Sync with head.
 1.12.2.2  15-Jul-2007  ad Sync with head.
 1.12.2.1  10-Apr-2007  ad Sync with head.
 1.14.32.2  11-Mar-2010  yamt sync with head
 1.14.32.1  16-May-2008  yamt sync with head.
 1.14.30.1  18-May-2008  yamt sync with head.
 1.14.28.1  02-Jun-2008  mjf Sync with HEAD.
 1.16.18.1  05-Jul-2012  riz Pull up following revision(s) (requested by mlelstv in ticket #402):
sys/dev/vnd.c: revision 1.221
sys/kern/init_main.c: revision 1.443
sys/kern/init_main.c: revision 1.444
sys/dev/dkwedge/dk.c: revision 1.64
sys/arch/x86/x86/x86_autoconf.c: revision 1.63
sys/arch/sparc64/sparc64/autoconf.c: revision 1.187
sys/sys/device.h: revision 1.141
sys/dev/dkwedge/dkwedge_bsdlabel.c: revision 1.17
sys/kern/kern_subr.c: revision 1.213
sys/arch/zaurus/zaurus/autoconf.c: revision 1.11
sys/arch/xen/x86/autoconf.c: revision 1.14
sys/sys/disk.h: revision 1.57
Use the label's packname to create wedge names instead of the classic
device names. Fall back to classic device names when the label has an
empty name or the default name 'fictitious'.
autodiscover wedges
Make detection of root on wedges (dk(4)) machine independent. Remove
MD code for x86, xen, sparc64.
Make detection of root on wedges (dk(4)) machine independent. Remove
MD code for zaurus.
Do not try to find the wedge we booted from if opendisk(booted_device)
failed.
 1.16.12.2  22-May-2014  yamt 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")
 1.16.12.1  30-Oct-2012  yamt sync with head
 1.17.4.1  18-May-2014  rmind sync with head
 1.17.2.2  03-Dec-2017  jdolecek update from HEAD
 1.17.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.4.1  11-Nov-2014  martin Pull up following revision(s) (requested by mlelstv in ticket #200):
sys/dev/dkwedge/dkwedge_bsdlabel.c: revision 1.23
sys/dev/dkwedge/dkwedge_mbr.c: revision 1.8
sys/dev/dkwedge/dkwedge_gpt.c: revision 1.14
Handle disks with non DEV_BSIZE sectors.
get sector size from disk structure.
Be less noisy when handling wedge name conflicts.
 1.23.20.2  21-Apr-2020  martin Sync with HEAD
 1.23.20.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.24.8.1  20-Apr-2020  bouyer Sync with HEAD

RSS XML Feed