| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: bootpref.c,v 1.5 2009/03/14 21:04:07 dsl Exp $ */ | | 1 | /* $NetBSD: bootpref.c,v 1.6 2009/03/17 00:18:40 he Exp $ */ |
2 | /*- | | 2 | /*- |
3 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | | 3 | * Copyright (c) 1998 The NetBSD Foundation, Inc. |
4 | * All rights reserved. | | 4 | * All rights reserved. |
5 | * | | 5 | * |
6 | * This code is derived from software contributed to The NetBSD Foundation | | 6 | * This code is derived from software contributed to The NetBSD Foundation |
7 | * by Julian Coleman. | | 7 | * by Julian Coleman. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -369,27 +369,27 @@ getNVpref (int fd, u_char bootpref[]) | | | @@ -369,27 +369,27 @@ getNVpref (int fd, u_char bootpref[]) |
369 | /* Date format/separator */ | | 369 | /* Date format/separator */ |
370 | printf ("Date format is "); | | 370 | printf ("Date format is "); |
371 | showDateFmt (readNVRAM (fd, NVRAM_DATIME)); | | 371 | showDateFmt (readNVRAM (fd, NVRAM_DATIME)); |
372 | printf ("Date separator is "); | | 372 | printf ("Date separator is "); |
373 | showDateSep (readNVRAM (fd, NVRAM_DATESEP)); | | 373 | showDateSep (readNVRAM (fd, NVRAM_DATESEP)); |
374 | /* Video */ | | 374 | /* Video */ |
375 | printf ("Video is (0x%02x, 0x%02x) :\n", readNVRAM (fd, NVRAM_VID2), | | 375 | printf ("Video is (0x%02x, 0x%02x) :\n", readNVRAM (fd, NVRAM_VID2), |
376 | readNVRAM (fd, NVRAM_VID1)); | | 376 | readNVRAM (fd, NVRAM_VID1)); |
377 | showVideo2 (readNVRAM (fd, NVRAM_VID2)); | | 377 | showVideo2 (readNVRAM (fd, NVRAM_VID2)); |
378 | showVideo1 (readNVRAM (fd, NVRAM_VID1), readNVRAM (fd, NVRAM_VID2)); | | 378 | showVideo1 (readNVRAM (fd, NVRAM_VID1), readNVRAM (fd, NVRAM_VID2)); |
379 | } | | 379 | } |
380 | | | 380 | |
381 | static void | | 381 | static void |
382 | setNVpref (int fd, u_char bootpref[], set, int verbose) | | 382 | setNVpref (int fd, u_char bootpref[], int set, int verbose) |
383 | { | | 383 | { |
384 | /* Boot OS */ | | 384 | /* Boot OS */ |
385 | if (set & SET_OS) { | | 385 | if (set & SET_OS) { |
386 | writeNVRAM (fd, NVRAM_BOOTPREF, bootpref[ARRAY_OS]); | | 386 | writeNVRAM (fd, NVRAM_BOOTPREF, bootpref[ARRAY_OS]); |
387 | if (verbose) { | | 387 | if (verbose) { |
388 | printf ("Boot OS set to "); | | 388 | printf ("Boot OS set to "); |
389 | showOS (readNVRAM (fd, NVRAM_BOOTPREF)); | | 389 | showOS (readNVRAM (fd, NVRAM_BOOTPREF)); |
390 | } | | 390 | } |
391 | } | | 391 | } |
392 | /* Boot Delay */ | | 392 | /* Boot Delay */ |
393 | if (set & SET_BOOTDLY) { | | 393 | if (set & SET_BOOTDLY) { |
394 | writeNVRAM (fd, NVRAM_BOOTDLY, bootpref[ARRAY_BOOTDLY]); | | 394 | writeNVRAM (fd, NVRAM_BOOTDLY, bootpref[ARRAY_BOOTDLY]); |
395 | if (verbose) { | | 395 | if (verbose) { |