diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-07-23 05:21:24 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-07-23 05:21:24 +0000 |
commit | 2effdec8ef5258fb4e749beaf5f08c8c30099d2a (patch) | |
tree | 111302501e006ab7221f85995daf51312ef4a5ab /sbin | |
parent | 5207d4715d1efb29aac99eab9f9ab6c045d33e84 (diff) |
Fix annoying bug where disklabel would give you wrong default size for last
partition on disk and then complain when you chose it.
The fix makes sure you get the "correct size".
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/disklabel/editor.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index e70224ebd59..aa4660034f5 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.37 1998/06/21 22:13:52 millert Exp $ */ +/* $OpenBSD: editor.c,v 1.38 1998/07/23 05:21:23 csapuntz Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.37 1998/06/21 22:13:52 millert Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.38 1998/07/23 05:21:23 csapuntz Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -1719,11 +1719,11 @@ free_chunks(lp) } } else { /* Last partition */ - if (spp[i]->p_offset + spp[i]->p_size < lp->d_secperunit) { - + if (spp[i]->p_offset + spp[i]->p_size < ending_sector) { + chunks[numchunks].start = spp[i]->p_offset + spp[i]->p_size; - chunks[numchunks].stop = lp->d_secperunit; + chunks[numchunks].stop = ending_sector; numchunks++; } } |