mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-23 17:31:43 +01:00
Change switch statement to two if statements. This saves 208 bytes in
the object file which is enough to bring the size down to the point where the bootstrap fits into 15 sectors.
This commit is contained in:
parent
698a2ca9f2
commit
0eb0343191
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1438
@ -24,7 +24,7 @@
|
||||
* the rights to redistribute these changes.
|
||||
*
|
||||
* from: Mach, [92/04/03 16:51:14 rvb]
|
||||
* $Id: boot.c,v 1.9 1994/02/22 22:59:38 rgrimes Exp $
|
||||
* $Id: boot.c,v 1.10 1994/04/20 22:06:24 phk Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ int drive;
|
||||
ouraddr,
|
||||
argv[7] = memsize(0),
|
||||
argv[8] = memsize(1),
|
||||
"$Revision: 1.9 $");
|
||||
"$Revision: 1.10 $");
|
||||
printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
|
||||
gateA20();
|
||||
loadstart:
|
||||
@ -243,14 +243,10 @@ loadprog(howto)
|
||||
printf("Press 'A', 'B' or any other key for the default ");
|
||||
printf("%c: ", unit+'A');
|
||||
i = getchar();
|
||||
switch (i) {
|
||||
case '0': case 'A': case 'a':
|
||||
unit = 0;
|
||||
break;
|
||||
case '1': case 'B': case 'b':
|
||||
unit = 1;
|
||||
break;
|
||||
}
|
||||
if (i=='0' || i=='A' || i=='a')
|
||||
unit = 0;
|
||||
if (i=='1' || i=='B' || i=='b')
|
||||
unit = 1;
|
||||
printf("\n");
|
||||
break;
|
||||
case 4:
|
||||
|
@ -24,7 +24,7 @@
|
||||
* the rights to redistribute these changes.
|
||||
*
|
||||
* from: Mach, [92/04/03 16:51:14 rvb]
|
||||
* $Id: boot.c,v 1.9 1994/02/22 22:59:38 rgrimes Exp $
|
||||
* $Id: boot.c,v 1.10 1994/04/20 22:06:24 phk Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ int drive;
|
||||
ouraddr,
|
||||
argv[7] = memsize(0),
|
||||
argv[8] = memsize(1),
|
||||
"$Revision: 1.9 $");
|
||||
"$Revision: 1.10 $");
|
||||
printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
|
||||
gateA20();
|
||||
loadstart:
|
||||
@ -243,14 +243,10 @@ loadprog(howto)
|
||||
printf("Press 'A', 'B' or any other key for the default ");
|
||||
printf("%c: ", unit+'A');
|
||||
i = getchar();
|
||||
switch (i) {
|
||||
case '0': case 'A': case 'a':
|
||||
unit = 0;
|
||||
break;
|
||||
case '1': case 'B': case 'b':
|
||||
unit = 1;
|
||||
break;
|
||||
}
|
||||
if (i=='0' || i=='A' || i=='a')
|
||||
unit = 0;
|
||||
if (i=='1' || i=='B' || i=='b')
|
||||
unit = 1;
|
||||
printf("\n");
|
||||
break;
|
||||
case 4:
|
||||
|
Loading…
Reference in New Issue
Block a user