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: devices.c,v 1.6 1995/05/06 09:34:09 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 --- 81 unchanged lines hidden (view full) --- 97 chunk_info[i] = NULL; 98} 99 100static void 101print_chunks(struct disk *d) 102{ 103 int row; 104 int i; |
105 106 attrset(A_NORMAL); 107 mvaddstr(0, 0, "Disk name:\t"); |
108 attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL); |
109 attrset(A_REVERSE); mvaddstr(0, 55, "Master Partition Editor"); attrset(A_NORMAL); 110 mvprintw(1, 0, 111 "BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors", 112 d->bios_cyl, d->bios_hd, d->bios_sect); 113 mvprintw(3, 1, "%10s %10s %10s %8s %8s %8s %8s %8s", 114 "Offset", "Size", "End", "Name", "PType", "Desc", 115 "Subtype", "Flags"); 116 for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) { 117 if (i == current_chunk) |
118 attrset(A_REVERSE); |
119 mvprintw(row, 2, "%10lu %10lu %10lu %8s %8d %8s %8d %6lx", 120 chunk_info[i]->offset, chunk_info[i]->size, 121 chunk_info[i]->end, chunk_info[i]->name, 122 chunk_info[i]->type, chunk_n[chunk_info[i]->type], 123 chunk_info[i]->subtype, chunk_info[i]->flags); 124 if (i == current_chunk) 125 attrset(A_NORMAL); 126 } 127} 128 129static void 130print_command_summary() 131{ |
132 mvprintw(14, 0, "The following commands are supported (in upper or lower case):"); 133 mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition"); 134 mvprintw(17, 0, "D = Delete Partition G = Set BIOS Geometry S = Set Bootable"); 135 mvprintw(18, 0, "U = Undo All Changes W = `Wizard' Mode ESC = Proceed to next screen"); 136 mvprintw(20, 0, "The currently selected partition is displayed in "); |
137 attrset(A_REVERSE); addstr("reverse video"); attrset(A_NORMAL); |
138 move(0, 0); 139} 140 141struct disk * 142device_slice_disk(struct disk *d) 143{ 144 char *p; 145 int key = 0; --- 187 unchanged lines hidden --- |