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