diff options
author | phk <phk@FreeBSD.org> | 1994-10-17 02:31:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1994-10-17 02:31:33 +0000 |
commit | caadb2f38428872709e899a6171987647941bff4 (patch) | |
tree | d61f364afd761ce50150f05bda0f7afe69d71967 /sys/ufs | |
parent | 43d02c481a8fe015c7028c8a9d01a9ff5d8f6d88 (diff) | |
download | FreeBSD-src-caadb2f38428872709e899a6171987647941bff4.zip FreeBSD-src-caadb2f38428872709e899a6171987647941bff4.tar.gz |
This basically allows you to stick a disklabel on any partition.
For it to be useful, you must stick your disklabel on the partition which
starts where the MBR says FreeBSD lives. If you don't do that, you might
get a bad day.
Oh, that probably also means that putting swap there is a bad idea...
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_disksubr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_disksubr.c b/sys/ufs/ufs/ufs_disksubr.c index 2d37210..f116269 100644 --- a/sys/ufs/ufs/ufs_disksubr.c +++ b/sys/ufs/ufs/ufs_disksubr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94 - * $Id: ufs_disksubr.c,v 1.3 1994/08/02 07:54:53 davidg Exp $ + * $Id: ufs_disksubr.c,v 1.4 1994/10/08 06:57:23 phk Exp $ */ #include <sys/param.h> @@ -361,11 +361,14 @@ writedisklabel(dev, strat, lp) int error = 0; labelpart = dkpart(dev); + /* XXX this is wrong. But leaving it in is worse. */ +#ifndef __FREEBSD__ if (lp->d_partitions[labelpart].p_offset != 0) { if (lp->d_partitions[0].p_offset != 0) return (EXDEV); /* not quite right */ labelpart = 0; } +#endif bp = geteblk((int)lp->d_secsize); bp->b_dev = makedev(major(dev), dkminor(dkunit(dev), labelpart)); bp->b_blkno = LABELSECTOR; |