| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: md.c,v 1.10 2018/06/03 14:38:28 martin Exp $ */ | | 1 | /* $NetBSD: md.c,v 1.11 2018/06/03 18:59:45 christos Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright 1997 Piermont Information Systems Inc. | | 4 | * Copyright 1997 Piermont Information Systems Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Based on code written by Philip A. Nelson for Piermont Information | | 7 | * Based on code written by Philip A. Nelson for Piermont Information |
8 | * Systems Inc. | | 8 | * Systems Inc. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -319,26 +319,27 @@ md_post_newfs(void) | | | @@ -319,26 +319,27 @@ md_post_newfs(void) |
319 | | | 319 | |
320 | /* | | 320 | /* |
321 | * Get console device, should either be ttyE0 or tty0n. | | 321 | * Get console device, should either be ttyE0 or tty0n. |
322 | * Too hard to double check, so just 'know' the device numbers. | | 322 | * Too hard to double check, so just 'know' the device numbers. |
323 | */ | | 323 | */ |
324 | len = sizeof condev; | | 324 | len = sizeof condev; |
325 | if (sysctl(conmib, __arraycount(conmib), &condev, &len, NULL, 0) != -1 | | 325 | if (sysctl(conmib, __arraycount(conmib), &condev, &len, NULL, 0) != -1 |
326 | && (condev & ~3) == 0x800) { | | 326 | && (condev & ~3) == 0x800) { |
327 | /* Motherboard serial port */ | | 327 | /* Motherboard serial port */ |
328 | boottype.bp_consdev = (condev & 3) + 1; | | 328 | boottype.bp_consdev = (condev & 3) + 1; |
329 | /* Defaulting the baud rate to that of stdin should suffice */ | | 329 | /* Defaulting the baud rate to that of stdin should suffice */ |
330 | if (tcgetattr(0, &t) != -1) | | 330 | if (tcgetattr(0, &t) != -1) |
331 | boottype.bp_conspeed = t.c_ispeed; | | 331 | boottype.bp_conspeed = t.c_ispeed; |
| | | 332 | } |
332 | | | 333 | |
333 | if (pm == NULL || !pm->no_part) { | | 334 | if (pm == NULL || !pm->no_part) { |
334 | /* | | 335 | /* |
335 | * Get console device, should either be ttyE0 or tty0n. | | 336 | * Get console device, should either be ttyE0 or tty0n. |
336 | * Too hard to double check, so just 'know' the device numbers. | | 337 | * Too hard to double check, so just 'know' the device numbers. |
337 | */ | | 338 | */ |
338 | len = sizeof condev; | | 339 | len = sizeof condev; |
339 | if (sysctl(conmib, nelem(conmib), &condev, &len, NULL, 0) != -1 | | 340 | if (sysctl(conmib, nelem(conmib), &condev, &len, NULL, 0) != -1 |
340 | && (condev & ~3) == 0x800) { | | 341 | && (condev & ~3) == 0x800) { |
341 | /* Motherboard serial port */ | | 342 | /* Motherboard serial port */ |
342 | boottype.bp_consdev = (condev & 3) + 1; | | 343 | boottype.bp_consdev = (condev & 3) + 1; |
343 | /* Defaulting the baud rate to that of stdin should suffice */ | | 344 | /* Defaulting the baud rate to that of stdin should suffice */ |
344 | if (tcgetattr(0, &t) != -1) | | 345 | if (tcgetattr(0, &t) != -1) |