Date: Tue, 15 Apr 2003 16:46:19 -0700 (PDT) From: Jake Burkholder <jake@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sbin/sunlabel sunlabel.c Message-ID: <200304152346.h3FNkJTA058720@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jake 2003/04/15 16:46:19 PDT FreeBSD src repository Modified files: sbin/sunlabel sunlabel.c Log: - Use read(2) to get the existing sunlabel on a disk, instead of parsing kern.geom.conftxt, which md disks don't show up in. If the magic and the checksum are right assume its a valid sunlabel, otherwise use the DIOC ioctls to get the disk parameters and whip up a label out of thin air. - Don't just silently create or correct invalid c partitions, warn about invalid ones in label proto files. - Split checksumming into a function since we do it a couple times. Also don't include the sl_cksum field in the checksum, which avoids needing to clear it first. This is makes sunlabel a suitable replacement for disklabel in make release. Revision Changes Path 1.2 +80 -76 src/sbin/sunlabel/sunlabel.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304152346.h3FNkJTA058720>