disks.c (8581) | disks.c (8589) |
---|---|
1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * | 1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * |
7 * $Id: disks.c,v 1.20 1995/05/17 14:39:38 jkh Exp $ | 7 * $Id: disks.c,v 1.21 1995/05/17 16:16:07 jkh Exp $ |
8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 58 unchanged lines hidden (view full) --- 74} 75 76static void 77print_chunks(Disk *d) 78{ 79 int row; 80 int i; 81 | 8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 58 unchanged lines hidden (view full) --- 74} 75 76static void 77print_chunks(Disk *d) 78{ 79 int row; 80 int i; 81 |
82 dialog_clear(); | 82 clear(); |
83 attrset(A_NORMAL); 84 mvaddstr(0, 0, "Disk name:\t"); 85 attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL); 86 attrset(A_REVERSE); mvaddstr(0, 55, "Master Partition Editor"); attrset(A_NORMAL); 87 mvprintw(1, 0, 88 "BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors", 89 d->bios_cyl, d->bios_hd, d->bios_sect); 90 mvprintw(3, 1, "%10s %10s %10s %8s %8s %8s %8s %8s", --- 83 unchanged lines hidden (view full) --- 174 record_chunks(d); 175 break; 176 177 case 'B': 178 if (chunk_info[current_chunk]->type != freebsd) 179 msg = "Can only scan for bad blocks in FreeBSD partition."; 180 else if (strncmp(name, "sd", 2) || 181 !msgYesNo("This typically makes sense only for ESDI, IDE or MFM drives.\nAre you sure you want to do this on a SCSI disk?")) | 83 attrset(A_NORMAL); 84 mvaddstr(0, 0, "Disk name:\t"); 85 attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL); 86 attrset(A_REVERSE); mvaddstr(0, 55, "Master Partition Editor"); attrset(A_NORMAL); 87 mvprintw(1, 0, 88 "BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors", 89 d->bios_cyl, d->bios_hd, d->bios_sect); 90 mvprintw(3, 1, "%10s %10s %10s %8s %8s %8s %8s %8s", --- 83 unchanged lines hidden (view full) --- 174 record_chunks(d); 175 break; 176 177 case 'B': 178 if (chunk_info[current_chunk]->type != freebsd) 179 msg = "Can only scan for bad blocks in FreeBSD partition."; 180 else if (strncmp(name, "sd", 2) || 181 !msgYesNo("This typically makes sense only for ESDI, IDE or MFM drives.\nAre you sure you want to do this on a SCSI disk?")) |
182 chunk_info[current_chunk]->flags |= CHUNK_BAD144; | 182 if (chunk_info[current_chunk]->flags & CHUNK_BAD144) 183 chunk_info[current_chunk]->flags &= ~CHUNK_BAD144; 184 else 185 chunk_info[current_chunk]->flags |= CHUNK_BAD144; |
183 break; 184 185 case 'C': 186 if (chunk_info[current_chunk]->type != unused) 187 msg = "Partition in use, delete it first or move to an unused one."; 188 else { 189 char *val, tmp[20], *cp; 190 int size; --- 139 unchanged lines hidden --- | 186 break; 187 188 case 'C': 189 if (chunk_info[current_chunk]->type != unused) 190 msg = "Partition in use, delete it first or move to an unused one."; 191 else { 192 char *val, tmp[20], *cp; 193 int size; --- 139 unchanged lines hidden --- |