mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-28 19:26:16 +00:00
[NTOSKRNL]
- Skip other spaces preceding a command option instead of increasing the reading pointer of a constant (should fix KDSERIAL). - Use a macro for representing length in chars of constant strings instead of putting magic values. svn path=/trunk/; revision=57787
This commit is contained in:
+10
-11
@@ -1705,30 +1705,29 @@ INIT_FUNCTION
|
||||
KdbpGetCommandLineSettings(
|
||||
PCHAR p1)
|
||||
{
|
||||
PCHAR p2;
|
||||
#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
while (p1 && (p2 = strchr(p1, ' ')))
|
||||
while (p1 && (p1 = strchr(p1, ' ')))
|
||||
{
|
||||
p2 += 2;
|
||||
/* Skip other spaces */
|
||||
while (*p1 == ' ') ++p1;
|
||||
|
||||
if (!_strnicmp(p2, "KDSERIAL", 8))
|
||||
if (!_strnicmp(p1, "KDSERIAL", CONST_STR_LEN("KDSERIAL")))
|
||||
{
|
||||
p2 += 8;
|
||||
p1 += CONST_STR_LEN("KDSERIAL");
|
||||
KdbDebugState |= KD_DEBUG_KDSERIAL;
|
||||
KdpDebugMode.Serial = TRUE;
|
||||
}
|
||||
else if (!_strnicmp(p2, "KDNOECHO", 8))
|
||||
else if (!_strnicmp(p1, "KDNOECHO", CONST_STR_LEN("KDNOECHO")))
|
||||
{
|
||||
p2 += 8;
|
||||
p1 += CONST_STR_LEN("KDNOECHO");
|
||||
KdbDebugState |= KD_DEBUG_KDNOECHO;
|
||||
}
|
||||
else if (!_strnicmp(p2, "FIRSTCHANCE", 11))
|
||||
else if (!_strnicmp(p1, "FIRSTCHANCE", CONST_STR_LEN("FIRSTCHANCE")))
|
||||
{
|
||||
p2 += 11;
|
||||
p1 += CONST_STR_LEN("FIRSTCHANCE");
|
||||
KdbpSetEnterCondition(-1, TRUE, KdbEnterAlways);
|
||||
}
|
||||
|
||||
p1 = p2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user