Root/
Source at commit 406 created 13 years 10 months ago. By azimutz, Consolidating this position: while testing the new theme and boot-log function, i realized that when it comes to verbose boot, using the -v flag on Boot.plist (or typed at boot prompt) and using the Menu (Boot Verbose), doesn't produce the exact same output; using the Menu displays all the messages, while typing -v causes some of the first messages to disappear. So, moving this to an early stage isn't anymore a question of what is printed to screen or not! Tests also showed another diff: when using -v flag typed, the Boot Banner is cleared and messages start to print right away, while using Boot Verbose on the Menu, keeps the Banner, prints the first 2 or 3 messages right below it and the rest are only printed, when this code runs and does it's thing. Moving the code to this position fixes this glitch. | |
---|---|
1 | /*␊ |
2 | * ext2fs.c␊ |
3 | * ␊ |
4 | *␊ |
5 | * Created by mackerintel on 1/26/09.␊ |
6 | * Copyright 2009 __MyCompanyName__. All rights reserved.␊ |
7 | *␊ |
8 | */␊ |
9 | ␊ |
10 | #include "libsaio.h"␊ |
11 | #include "sl.h"␊ |
12 | #include "ext2fs.h"␊ |
13 | ␊ |
14 | #define EX2ProbeSize␉2048␊ |
15 | ␊ |
16 | bool EX2Probe (const void *buf)␊ |
17 | {␊ |
18 | ␉return (OSReadLittleInt16(buf+0x438,0)==0xEF53);␊ |
19 | }␊ |
20 | ␊ |
21 | void EX2GetDescription(CICell ih, char *str, long strMaxLen)␊ |
22 | {␊ |
23 | ␉char * buf=malloc (EX2ProbeSize);␊ |
24 | ␉str[0]=0;␊ |
25 | ␉if (!buf)␊ |
26 | ␉␉return;␊ |
27 | ␉Seek(ih, 0);␊ |
28 | ␉Read(ih, (long)buf, EX2ProbeSize);␊ |
29 | ␉if (!EX2Probe (buf))␊ |
30 | ␉{␊ |
31 | ␉␉free (buf);␊ |
32 | ␉␉return;␊ |
33 | ␉}␊ |
34 | ␉if (OSReadLittleInt32 (buf+0x44c,0)<1)␊ |
35 | ␉{␊ |
36 | ␉␉free (buf);␊ |
37 | ␉␉return;␊ |
38 | ␉}␊ |
39 | ␉str[strMaxLen]=0;␊ |
40 | ␉strncpy (str, buf+0x478, min (strMaxLen, 16));␊ |
41 | ␉free (buf);␊ |
42 | }␊ |
43 |