fdisk.c (108395) | fdisk.c (108470) |
---|---|
1/* 2 * Mach Operating System 3 * Copyright (c) 1992 Carnegie Mellon University 4 * All Rights Reserved. 5 * 6 * Permission to use, copy, modify and distribute this software and its 7 * documentation is hereby granted, provided that both the copyright 8 * notice and this permission notice appear in all copies of the --- 12 unchanged lines hidden (view full) --- 21 * Pittsburgh PA 15213-3890 22 * 23 * any improvements or extensions that they make and grant Carnegie Mellon 24 * the rights to redistribute these changes. 25 */ 26 27#ifndef lint 28static const char rcsid[] = | 1/* 2 * Mach Operating System 3 * Copyright (c) 1992 Carnegie Mellon University 4 * All Rights Reserved. 5 * 6 * Permission to use, copy, modify and distribute this software and its 7 * documentation is hereby granted, provided that both the copyright 8 * notice and this permission notice appear in all copies of the --- 12 unchanged lines hidden (view full) --- 21 * Pittsburgh PA 15213-3890 22 * 23 * any improvements or extensions that they make and grant Carnegie Mellon 24 * the rights to redistribute these changes. 25 */ 26 27#ifndef lint 28static const char rcsid[] = |
29 "$FreeBSD: head/sbin/fdisk/fdisk.c 108395 2002-12-29 15:17:11Z phk $"; | 29 "$FreeBSD: head/sbin/fdisk/fdisk.c 108470 2002-12-30 21:18:15Z schweikh $"; |
30#endif /* not lint */ 31 32#include <sys/disk.h> 33#include <sys/disklabel.h> 34#include <sys/diskmbr.h> 35#include <sys/param.h> 36#include <sys/stat.h> 37#include <sys/mount.h> --- 1050 unchanged lines hidden (view full) --- 1088 * Insure that it's unused. 1089 */ 1090 bzero((char *)partp, sizeof (struct dos_partition)); 1091 status = 1; 1092 break; 1093 } 1094 1095 /* | 30#endif /* not lint */ 31 32#include <sys/disk.h> 33#include <sys/disklabel.h> 34#include <sys/diskmbr.h> 35#include <sys/param.h> 36#include <sys/stat.h> 37#include <sys/mount.h> --- 1050 unchanged lines hidden (view full) --- 1088 * Insure that it's unused. 1089 */ 1090 bzero((char *)partp, sizeof (struct dos_partition)); 1091 status = 1; 1092 break; 1093 } 1094 1095 /* |
1096 * Adjust start upwards, if necessary, to fall on an head boundary. | 1096 * Adjust start upwards, if necessary, to fall on a head boundary. |
1097 */ 1098 if (partp->dp_start % dos_sectors != 0) { 1099 prev_head_boundary = partp->dp_start / dos_sectors * dos_sectors; 1100 if (max_end < dos_sectors || 1101 prev_head_boundary > max_end - dos_sectors) { 1102 /* 1103 * Can't go past end of partition 1104 */ --- 194 unchanged lines hidden (view full) --- 1299 warnx("WARNING: partition does not start on a head boundary"); 1300 if ((start +size) % dos_sectors != 0) 1301 warnx("WARNING: partition does not end on a cylinder boundary"); 1302 warnx("WARNING: this may confuse the BIOS or some operating systems"); 1303 if (!ok("Correct this automatically?")) 1304 return (1); 1305 1306 /* | 1097 */ 1098 if (partp->dp_start % dos_sectors != 0) { 1099 prev_head_boundary = partp->dp_start / dos_sectors * dos_sectors; 1100 if (max_end < dos_sectors || 1101 prev_head_boundary > max_end - dos_sectors) { 1102 /* 1103 * Can't go past end of partition 1104 */ --- 194 unchanged lines hidden (view full) --- 1299 warnx("WARNING: partition does not start on a head boundary"); 1300 if ((start +size) % dos_sectors != 0) 1301 warnx("WARNING: partition does not end on a cylinder boundary"); 1302 warnx("WARNING: this may confuse the BIOS or some operating systems"); 1303 if (!ok("Correct this automatically?")) 1304 return (1); 1305 1306 /* |
1307 * Adjust start upwards, if necessary, to fall on an head boundary. | 1307 * Adjust start upwards, if necessary, to fall on a head boundary. |
1308 */ 1309 if (start % dos_sectors != 0) { 1310 prev_head_boundary = start / dos_sectors * dos_sectors; 1311 if (max_end < dos_sectors || 1312 prev_head_boundary >= max_end - dos_sectors) { 1313 /* 1314 * Can't go past end of partition 1315 */ --- 69 unchanged lines hidden --- | 1308 */ 1309 if (start % dos_sectors != 0) { 1310 prev_head_boundary = start / dos_sectors * dos_sectors; 1311 if (max_end < dos_sectors || 1312 prev_head_boundary >= max_end - dos_sectors) { 1313 /* 1314 * Can't go past end of partition 1315 */ --- 69 unchanged lines hidden --- |