Author: silverblade
Date: Sat Jan 17 08:20:47 2009
New Revision: 38813
URL: http://svn.reactos.org/svn/reactos?rev=38813&view=rev
Log:
Treat "LiveCD" system path as a prefix rather than an entire path. This allows a custom path to be specified,
so FreeLDR can boot multiple ReactOS builds from the same CD. FreeLDR happily does this, ReactOS does not like
booting from a livecd path other than \reactos however. Updated livecd.ini to use the new style of livecd
system path.
Modified:
trunk/reactos/boot/bootdata/livecd.ini
trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
Modified: trunk/reactos/boot/bootdata/livecd.ini
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/livecd.ini?r…
==============================================================================
--- trunk/reactos/boot/bootdata/livecd.ini [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/livecd.ini [iso-8859-1] Sat Jan 17 08:20:47 2009
@@ -24,5 +24,5 @@
[ReactOS]
BootType=ReactOS
-SystemPath=LiveCD
+SystemPath=LiveCD\reactos
Options=/DEBUGPORT=COM1 /SOS
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] Sat Jan 17 08:20:47 2009
@@ -574,6 +574,7 @@
CHAR name[255];
CHAR value[255];
CHAR SystemPath[255];
+ CHAR LivePath[255];
CHAR szKernelName[255];
CHAR szFileName[255];
CHAR MsgBuffer[256];
@@ -704,11 +705,13 @@
/*
* Special case for Live CD.
*/
- if (!_stricmp(SystemPath, "LiveCD"))
- {
+ if (!_strnicmp(SystemPath, "LiveCD", strlen("LiveCD")))
+ {
+ /* Use everything following the "LiveCD" string as the path */
+ strcpy(LivePath, SystemPath + strlen("LiveCD"));
/* Normalize */
MachDiskGetBootPath(SystemPath, sizeof(SystemPath));
- strcat(SystemPath, "\\reactos");
+ strcat(SystemPath, LivePath);
strcat(strcpy(reactos_kernel_cmdline, SystemPath),
" /MININT");
}
Author: fireball
Date: Sat Jan 17 02:38:25 2009
New Revision: 38809
URL: http://svn.reactos.org/svn/reactos?rev=38809&view=rev
Log:
- RtlOemStringToCountedUnicodeString improvements:
* Fix STATUS_BUFFER_OVERFLOW when destination string's MaximumLength and Length are equal.
* Add comments.
Modified:
trunk/reactos/lib/rtl/unicode.c
Modified: trunk/reactos/lib/rtl/unicode.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/unicode.c?rev=3880…
==============================================================================
--- trunk/reactos/lib/rtl/unicode.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/unicode.c [iso-8859-1] Sat Jan 17 02:38:25 2009
@@ -1182,29 +1182,35 @@
PAGED_CODE_RTL();
+ /* Calculate size of the string */
Length = RtlOemStringToCountedUnicodeSize(OemSource);
+ /* If it's 0 then zero out dest string and return */
if (!Length)
{
RtlZeroMemory(UniDest, sizeof(UNICODE_STRING));
return STATUS_SUCCESS;
}
+ /* Check if length is a sane value */
if (Length > MAXUSHORT) return STATUS_INVALID_PARAMETER_2;
+ /* Store it in dest string */
UniDest->Length = (USHORT)Length;
+ /* If we're asked to alloc the string - do so */
if (AllocateDestinationString)
{
UniDest->Buffer = RtlpAllocateStringMemory(Length, TAG_USTR);
UniDest->MaximumLength = Length;
if (!UniDest->Buffer) return STATUS_NO_MEMORY;
}
- else if (UniDest->Length >= UniDest->MaximumLength)
+ else if (UniDest->Length > UniDest->MaximumLength)
{
return STATUS_BUFFER_OVERFLOW;
}
+ /* Do the conversion */
Status = RtlOemToUnicodeN(UniDest->Buffer,
UniDest->Length,
&Index,
@@ -1213,6 +1219,7 @@
if (!NT_SUCCESS(Status) && AllocateDestinationString)
{
+ /* Conversion failed, free dest string and return status code */
RtlpFreeStringMemory(UniDest->Buffer, TAG_USTR);
UniDest->Buffer = NULL;
return Status;
Author: fireball
Date: Sat Jan 17 01:44:28 2009
New Revision: 38808
URL: http://svn.reactos.org/svn/reactos?rev=38808&view=rev
Log:
- RtlUnicodeStringToCountedOemString improvements:
* Fix zero-sized input string handling, result would be error instead of success and zero output string.
* If destination string's MaximumLength and Length are equal, it's not an erroneous situation (in fact, a very common situation).
* Add comments.
Modified:
trunk/reactos/lib/rtl/unicode.c
Modified: trunk/reactos/lib/rtl/unicode.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/unicode.c?rev=3880…
==============================================================================
--- trunk/reactos/lib/rtl/unicode.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/unicode.c [iso-8859-1] Sat Jan 17 01:44:28 2009
@@ -1492,38 +1492,47 @@
PAGED_CODE_RTL();
+ /* Calculate size of the string */
Length = RtlUnicodeStringToCountedOemSize(UniSource);
+ /* If it's 0 then zero out dest string and return */
if (!Length)
{
RtlZeroMemory(OemDest, sizeof(OEM_STRING));
- }
-
+ return STATUS_SUCCESS;
+ }
+
+ /* Check if length is a sane value */
if (Length > MAXUSHORT) return STATUS_INVALID_PARAMETER_2;
+ /* Store it in dest string */
OemDest->Length = (USHORT)Length;
+ /* If we're asked to alloc the string - do so */
if (AllocateDestinationString)
{
OemDest->Buffer = RtlpAllocateStringMemory(Length, TAG_OSTR);
OemDest->MaximumLength = Length;
if (!OemDest->Buffer) return STATUS_NO_MEMORY;
}
- else if (OemDest->Length >= OemDest->MaximumLength)
+ else if (OemDest->Length > OemDest->MaximumLength)
{
return STATUS_BUFFER_OVERFLOW;
}
+ /* Do the conversion */
Status = RtlUnicodeToOemN(OemDest->Buffer,
OemDest->Length,
&Index,
UniSource->Buffer,
UniSource->Length);
- /* FIXME: Special check needed and return STATUS_UNMAPPABLE_CHARACTER */
+ /* FIXME: Check if everything mapped correctly and
+ * return STATUS_UNMAPPABLE_CHARACTER */
if (!NT_SUCCESS(Status) && AllocateDestinationString)
{
+ /* Conversion failed, free dest string and return status code */
RtlpFreeStringMemory(OemDest->Buffer, TAG_OSTR);
OemDest->Buffer = NULL;
return Status;
Author: jimtabor
Date: Sat Jan 17 01:07:36 2009
New Revision: 38807
URL: http://svn.reactos.org/svn/reactos?rev=38807&view=rev
Log:
- It is shameful, hacks like this.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Sat Jan 17 01:07:36 2009
@@ -118,7 +118,9 @@
return FALSE;
MessageQueue = Win32Thread->MessageQueue;
+// HACK!!!!!!! Newbies that wrote this should hold your head down in shame! (jt)
MessageQueue->WakeMask = ~0;
+ MessageQueue->WakeMask &= ~QS_TIMER;
return TRUE;
}
@@ -1432,7 +1434,9 @@
MessageQueue->LastMsgRead = LargeTickCount.u.LowPart;
MessageQueue->FocusWindow = NULL;
MessageQueue->PaintCount = 0;
+// HACK!!!!!!! Newbies that wrote this should hold your head down in shame! (jt)
MessageQueue->WakeMask = ~0;
+ MessageQueue->WakeMask &= ~QS_TIMER;
MessageQueue->NewMessagesHandle = NULL;
Status = ZwCreateEvent(&MessageQueue->NewMessagesHandle, EVENT_ALL_ACCESS,