Merge 13159:13510 from trunk Modified: branches/xmlbuildsystem/reactos/Makefile Modified: branches/xmlbuildsystem/reactos/ReactOS.xml Modified: branches/xmlbuildsystem/reactos/apps/utils/Makefile Modified: branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml Added: branches/xmlbuildsystem/reactos/apps/utils/net/ftp/ Added: branches/xmlbuildsystem/reactos/apps/utils/net/ftp/ftp.xml Modified: branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.c Added: branches/xmlbuildsystem/reactos/apps/utils/net/route/route.xml Added: branches/xmlbuildsystem/reactos/apps/utils/net/tracert/ Modified: branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.rc Modified: branches/xmlbuildsystem/reactos/apps/utils/objdir/objdir.c Added: branches/xmlbuildsystem/reactos/apps/utils/rosperf/ Modified: branches/xmlbuildsystem/reactos/apps/utils/shutdown/shutdown.c Modified: branches/xmlbuildsystem/reactos/apps/utils/tickcount/makefile Modified: branches/xmlbuildsystem/reactos/apps/utils/tickcount/tickcount.c Modified: branches/xmlbuildsystem/reactos/baseaddress.cfg Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/CHANGELOG Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/Makefile Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/archmach. c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware. c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware. h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hwcpu.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/i386disk. c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/machpc.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/machxbox. h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/mb.S Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/portio.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/xboxcons. c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk. c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/xboxfont. c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/xboxrtc.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo .c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/bootmgr.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/cache/blocklist.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/cache/cache.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/cache/cm.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/cmdline.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/comm/rs232.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/custom.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/debug.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/disk/disk.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/disk/partition.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/drivemap.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr.xml Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr_base.xml Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr_base64k.xml Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr_main.xml Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr_startup.xml Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/ext2.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/ext2.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/fat.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/fat.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/fs.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/fsrec.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/fsrec.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/iso.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/iso.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/ntfs.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/fs/ntfs.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/bootmgr.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/cache.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/cmdline.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/comm.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/debug.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/disk.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/drivemap.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/freeldr.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/fs.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/inffile.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/inifile.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/linux.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/machine.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/mm.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/multiboot.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/oslist.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/portio.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/reactos.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/rtl.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/ui.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/version.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/include/video.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/inffile/inffile.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/inifile/ini.h Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/inifile/ini_init.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/inifile/inifile.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/inifile/parse.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/linuxboot.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/machine.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/miscboot.c Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/mm/mem.h [truncated at 100 lines; 1237 more skipped] _____
Modified: branches/xmlbuildsystem/reactos/Makefile --- branches/xmlbuildsystem/reactos/Makefile 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/Makefile 2005-02-15 21:24:19 UTC (rev 13590) @@ -26,23 +26,21 @@
${nmkdir} $(ROS_INTERMEDIATE) endif
-Makefile.auto: rmkdir buildno wmc rbuild +include tools/Makefile +-include Makefile.auto + +Makefile.auto: $(RMKDIR_TARGET) $(BUILDNO_TARGET) $(NCI_SERVICE_FILES) $(WMC_TARGET) $(RBUILD_TARGET) tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw -# $(MAKE) $(MAKECMDGOALS) + $(MAKE) $(MAKECMDGOALS)
-init:: \ +init: \ include$(SEP)reactos$(SEP)bugcodes.h \ ntoskrnl$(SEP)bugcodes.rc \ include$(SEP)reactos$(SEP)errcodes.h \ lib$(SEP)kernel32$(SEP)errcodes.rc
-include$(SEP)reactos$(SEP)bugcodes.h ntoskrnl$(SEP)bugcodes.rc: ntoskrnl$(SEP)ntoskrnl.mc - $(WMC_TARGET) -H include$(SEP)reactos$(SEP)bugcodes.h -o ntoskrnl$(SEP)bugcodes.rc bugcodes$(SEP)ntoskrnl.mc +include$(SEP)reactos$(SEP)bugcodes.h ntoskrnl$(SEP)bugcodes.rc: $(WMC_TARGET) ntoskrnl$(SEP)ntoskrnl.mc + $(WMC_TARGET) -H include$(SEP)reactos$(SEP)bugcodes.h -o ntoskrnl$(SEP)bugcodes.rc ntoskrnl$(SEP)ntoskrnl.mc
-include$(SEP)reactos$(SEP)errcodes.h lib$(SEP)kernel32$(SEP)errcodes.rc: lib$(SEP)kernel32$(SEP)kernel32.mc +include$(SEP)reactos$(SEP)errcodes.h lib$(SEP)kernel32$(SEP)errcodes.rc: $(WMC_TARGET) lib$(SEP)kernel32$(SEP)kernel32.mc $(WMC_TARGET) -H include$(SEP)reactos$(SEP)errcodes.h -o lib$(SEP)kernel32$(SEP)errcodes.rc lib$(SEP)kernel32$(SEP)kernel32.mc - -include tools/Makefile -include tools/rbuild/makefile - -#-include Makefile.auto _____
Modified: branches/xmlbuildsystem/reactos/ReactOS.xml --- branches/xmlbuildsystem/reactos/ReactOS.xml 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/ReactOS.xml 2005-02-15 21:24:19 UTC (rev 13590) @@ -36,14 +36,6 @@
<directory name="hal"> <xi:include href="hal/directory.xml" /> </directory> - <directory name="iface"> - <directory name="addsys"> - <xi:include href="iface/addsys/addsys.xml" /> - </directory> - <directory name="native"> - <xi:include href="iface/native/genntdll.xml" /> - </directory> - </directory> <directory name="lib"> <xi:include href="lib/directory.xml" /> </directory> _____
Modified: branches/xmlbuildsystem/reactos/apps/utils/Makefile --- branches/xmlbuildsystem/reactos/apps/utils/Makefile 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/Makefile 2005-02-15 21:24:19 UTC (rev 13590) @@ -11,7 +11,7 @@
# cabman cat net objdir partinfo pice ps sc stats UTIL_APPS = cat objdir partinfo pnpdump sc shutdown stats tickcount consw rundll32 ps
-UTIL_NET_APPS = arp finger ipconfig netstat ping route telnet whois +UTIL_NET_APPS = arp finger ftp ipconfig netstat ping route telnet whois
all: $(UTIL_APPS) $(UTIL_NET_APPS) _____
Modified: branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml --- branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml 2005-02-15 21:24:19 UTC (rev 13590) @@ -4,6 +4,9 @@
<directory name="finger"> <xi:include href="finger/finger.xml" /> </directory> +<directory name="ftp"> + <xi:include href="ftp/ftp.xml" /> +</directory> <directory name="ipconfig"> <xi:include href="ipconfig/ipconfig.xml" /> </directory> @@ -13,6 +16,9 @@ <directory name="ping"> <xi:include href="ping/ping.xml" /> </directory> +<directory name="route"> + <xi:include href="route/route.xml" /> +</directory> <directory name="telnet"> <xi:include href="telnet/telnet.xml" /> </directory> _____
Copied: branches/xmlbuildsystem/reactos/apps/utils/net/ftp (from rev 13510, trunk/reactos/apps/utils/net/ftp) Property changes on: branches/xmlbuildsystem/reactos/apps/utils/net/ftp ___________________________________________________________________ Name: svn:ignore + *.sys *.exe *.dll *.cpl *.a *.o *.d *.coff *.dsp *.dsw *.aps *.ncb *.opt *.sym *.plg *.bak *.map _____
Added: branches/xmlbuildsystem/reactos/apps/utils/net/ftp/ftp.xml --- trunk/reactos/apps/utils/net/ftp/ftp.xml 2005-02-12 16:47:02 UTC (rev 13510) +++ branches/xmlbuildsystem/reactos/apps/utils/net/ftp/ftp.xml 2005-02-15 21:24:19 UTC (rev 13590) @@ -0,0 +1,15 @@
+<module name="ftp" type="win32cui"> + <include base="ftp">.</include> + <define name="__USE_W32API" /> + <library>kernel32</library> + <library>ws2_32</library> + <library>iphlpapi</library> + <file>cmds.c</file> + <file>cmdtab.c</file> + <file>domacro.c</file> + <file>fake.c</file> + <file>ftp.c</file> + <file>main.c</file> + <file>ruserpass.c</file> + <file>ftp.rc</file> +</module> _____
Modified: branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.c --- branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.c 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.c 2005-02-15 21:24:19 UTC (rev 13590) @@ -331,7 +331,7 @@
} if (phe != NULL) { - CopyMemory(&Target.sin_addr, phe->h_addr_list, phe->h_length); + CopyMemory(&Target.sin_addr, phe->h_addr, phe->h_length); } else { Target.sin_addr.s_addr = Addr; } @@ -391,19 +391,9 @@ LARGE_INTEGER LargeTime;
LargeTime.QuadPart = Time.QuadPart / TicksPerMs.QuadPart; + _i64toa(LargeTime.QuadPart, Convstr, 10); strcpy(String, Convstr); - strcat(String, ","); - - LargeTime.QuadPart = (Time.QuadPart % TicksPerMs.QuadPart) / TicksPerUs.QuadPart; - _i64toa(LargeTime.QuadPart, Convstr, 10); - Length = strlen(Convstr); - if (Length < 4) { - for (i = 0; i < 4 - Length; i++) - strcat(String, "0"); - } - - strcat(String, Convstr); strcat(String, "ms"); }
@@ -417,6 +407,7 @@ CHAR Time[100]; LARGE_INTEGER RelativeTime; LARGE_INTEGER LargeTime; + CHAR Sign[1];
IpHeader = (PIPv4_HEADER)buffer;
@@ -449,10 +440,17 @@
RelativeTime.QuadPart = (LargeTime.QuadPart - Icmp->Timestamp.QuadPart);
- TimeToMsString(Time, RelativeTime); + if ((RelativeTime.QuadPart / TicksPerMs.QuadPart) < 1) { + strcpy(Sign, "<"); + strcpy(Time, "1ms"); + } else { + strcpy(Sign, "="); + TimeToMsString(Time, RelativeTime); + }
- printf("Reply from %s: bytes=%d time=%s TTL=%d\n", inet_ntoa(from->sin_addr), - size - IphLength - sizeof(ICMP_ECHO_PACKET), Time, IpHeader->TTL); + + printf("Reply from %s: bytes=%d time%s%s TTL=%d\n", inet_ntoa(from->sin_addr), + size - IphLength - sizeof(ICMP_ECHO_PACKET), Sign, Time, IpHeader->TTL); if (RelativeTime.QuadPart < MinRTT.QuadPart) { MinRTT.QuadPart = RelativeTime.QuadPart; MinRTTSet = TRUE; _____
Added: branches/xmlbuildsystem/reactos/apps/utils/net/route/route.xml --- branches/xmlbuildsystem/reactos/apps/utils/net/route/route.xml 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/net/route/route.xml 2005-02-15 21:24:19 UTC (rev 13590) @@ -0,0 +1,8 @@
+<module name="route" type="win32cui"> + <include base="route">.</include> + <library>kernel32</library> + <library>ws2_32</library> + <library>iphlpapi</library> + <file>route.c</file> + <file>route.rc</file> +</module> _____
Copied: branches/xmlbuildsystem/reactos/apps/utils/net/tracert (from rev 13510, trunk/reactos/apps/utils/net/tracert) _____
Modified: branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.rc --- branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.rc 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.rc 2005-02-15 21:24:19 UTC (rev 13590) @@ -3,5 +3,4 @@
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS TCP/IPv4 Win32 Whois\0" #define REACTOS_STR_INTERNAL_NAME "whois\0" #define REACTOS_STR_ORIGINAL_FILENAME "whois.exe\0" -#define REACTOS_STR_ORIGINAL_COPYRIGHT "Steven Edwards (Isolation@users.sourceforge.net)\0" #include <reactos/version.rc> _____
Modified: branches/xmlbuildsystem/reactos/apps/utils/objdir/objdir.c --- branches/xmlbuildsystem/reactos/apps/utils/objdir/objdir.c 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/objdir/objdir.c 2005-02-15 21:24:19 UTC (rev 13590) @@ -79,10 +79,14 @@
return "STATUS_PATH_SYNTAX_BAD"; case STATUS_NO_MORE_ENTRIES: return "STATUS_NO_MORE_ENTRIES"; + case STATUS_MORE_ENTRIES: + return "STATUS_MORE_ENTRIES"; case STATUS_ACCESS_DENIED: return "STATUS_ACCESS_DENIED"; case STATUS_UNSUCCESSFUL: return "STATUS_UNSUCCESSFUL"; + case STATUS_INVALID_HANDLE: + return "STATUS_INVALID_HANDLE"; } sprintf (RawValue, "0x%08lx", Status); return (const char *) RawValue; @@ -173,8 +177,9 @@ OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; HANDLE DirectoryHandle; - BYTE DirectoryEntry [MAX_DIR_ENTRY * sizeof(DIRECTORY_BASIC_INFORMATION)]; - PDIRECTORY_BASIC_INFORMATION pDirectoryEntry = (PDIRECTORY_BASIC_INFORMATION) DirectoryEntry; + BYTE DirectoryEntry [512]; + POBJECT_DIRECTORY_INFORMATION pDirectoryEntry = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry; + POBJECT_DIRECTORY_INFORMATION pDirectoryEntries = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry; ULONG Context = 0; ULONG ReturnLength = 0; ULONG EntryCount = 0; @@ -217,25 +222,23 @@ return (FALSE); } printf ("\n Directory of %s\n\n", DirectoryNameA); + + for(;;) + { /* * Enumerate each item in the directory. */ Status = NtQueryDirectoryObject ( DirectoryHandle, - pDirectoryEntry, + pDirectoryEntries, sizeof DirectoryEntry, FALSE,/* ReturnSingleEntry */ - TRUE, /* RestartScan */ + FALSE, /* RestartScan */ & Context, & ReturnLength ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && Status != STATUS_NO_MORE_ENTRIES) { - if (STATUS_NO_MORE_ENTRIES == Status) - { - NtClose (DirectoryHandle); - return TRUE; - } printf ( "Failed to query directory object (Status: %s)\n", StatusToName (Status) @@ -243,12 +246,17 @@ NtClose (DirectoryHandle); return (FALSE); } - while (0 != pDirectoryEntry->ObjectTypeName.Length) + if (Status == STATUS_NO_MORE_ENTRIES) { + break; + } + pDirectoryEntry = pDirectoryEntries; + while (EntryCount < Context) + { CHAR ObjectNameA [MAX_PATH]; CHAR TypeNameA [MAX_PATH]; CHAR TargetNameA [MAX_PATH]; - + if (0 == wcscmp (L"SymbolicLink", pDirectoryEntry->ObjectTypeName.Buffer)) { if (TRUE == ExpandSymbolicLink ( @@ -258,7 +266,7 @@ ) ) { - + printf ( "%-16s %s -> %s\n", RawUszAsz (pDirectoryEntry->ObjectTypeName.Buffer, TypeNameA), @@ -283,9 +291,10 @@ RawUszAsz (pDirectoryEntry->ObjectName.Buffer, ObjectNameA) ); } + ++ pDirectoryEntry; ++ EntryCount; - ++ pDirectoryEntry; } + }; printf ("\n\t%lu object(s)\n", EntryCount); /* * Free any resource. @@ -296,7 +305,7 @@ */ if (FALSE != Recurse) { - pDirectoryEntry = (PDIRECTORY_BASIC_INFORMATION) DirectoryEntry; + pDirectoryEntry = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry; while (0 != pDirectoryEntry->ObjectTypeName.Length) { if (0 == wcscmp (L"Directory", pDirectoryEntry->ObjectTypeName.Buffer)) _____
Copied: branches/xmlbuildsystem/reactos/apps/utils/rosperf (from rev 13510, trunk/reactos/apps/utils/rosperf) Property changes on: branches/xmlbuildsystem/reactos/apps/utils/rosperf ___________________________________________________________________ Name: svn:ignore + *.o *.a *.d *.exe *.coff *.sym *.map _____
Modified: branches/xmlbuildsystem/reactos/apps/utils/shutdown/shutdown.c --- branches/xmlbuildsystem/reactos/apps/utils/shutdown/shutdown.c 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/shutdown/shutdown.c 2005-02-15 21:24:19 UTC (rev 13590) @@ -146,7 +146,6 @@
if (! AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0) || ERROR_SUCCESS != GetLastError()) { - CloseHandle(hToken); if (ERROR_NOT_ALL_ASSIGNED == GetLastError()) { _ftprintf(stderr, _T("You are not authorized to shutdown the system\n")); @@ -155,6 +154,7 @@ { _ftprintf(stderr, _T("AdjustTokenPrivileges failed with error %d\n"), (int) GetLastError()); } + CloseHandle(hToken); exit(1); } CloseHandle(hToken); _____
Modified: branches/xmlbuildsystem/reactos/apps/utils/tickcount/makefile --- branches/xmlbuildsystem/reactos/apps/utils/tickcount/makefile 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/tickcount/makefile 2005-02-15 21:24:19 UTC (rev 13590) @@ -12,7 +12,7 @@
TARGET_OBJECTS = tickcount.o
-TARGET_CFLAGS = -Wall -Werror +TARGET_CFLAGS = -Wall -Werror -D__USE_W32API
include $(PATH_TO_TOP)/rules.mak
_____
Modified: branches/xmlbuildsystem/reactos/apps/utils/tickcount/tickcount.c --- branches/xmlbuildsystem/reactos/apps/utils/tickcount/tickcount.c 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/apps/utils/tickcount/tickcount.c 2005-02-15 21:24:19 UTC (rev 13590) @@ -1,30 +1,32 @@
/* $Id$ */ /* - tickcount -- Display the kernel tick count in human-readable format + tickcount -- Display the kernel tick count (or any tick count passed as an + argument or as input) in human-readable format
This is public domain software */
#include <assert.h> #include <stdio.h> +#include <stdlib.h> #include <tchar.h> #include <windows.h>
-typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; +typedef __int64 int64_; +typedef unsigned __int64 uint64_;
-#define TICKS_YEAR (TICKS_DAY * ((uint64_t)365)) -#define TICKS_MONTH (TICKS_DAY * ((uint64_t)30)) -#define TICKS_WEEK (TICKS_DAY * ((uint64_t)7)) -#define TICKS_DAY (TICKS_HOUR * ((uint64_t)24)) -#define TICKS_HOUR (TICKS_MINUTE * ((uint64_t)60)) -#define TICKS_MINUTE (TICKS_SECOND * ((uint64_t)60)) -#define TICKS_SECOND ((uint64_t)1000) +#define TICKS_YEAR (TICKS_DAY * ((uint64_)365)) +#define TICKS_MONTH (TICKS_DAY * ((uint64_)30)) +#define TICKS_WEEK (TICKS_DAY * ((uint64_)7)) +#define TICKS_DAY (TICKS_HOUR * ((uint64_)24)) +#define TICKS_HOUR (TICKS_MINUTE * ((uint64_)60)) +#define TICKS_MINUTE (TICKS_SECOND * ((uint64_)60)) +#define TICKS_SECOND ((uint64_)1000)
#define SLICES_COUNT (sizeof(ticks_per_slice) / sizeof(ticks_per_slice[0]))
-uint64_t ticks_per_slice[] = +uint64_ ticks_per_slice[] = { TICKS_YEAR, TICKS_MONTH, @@ -36,7 +38,7 @@ 1 };
-_TCHAR * slice_names_singular[] = +_TCHAR * slice_names_singular[SLICES_COUNT] = { _T("year"), _T("month"), @@ -48,7 +50,7 @@ _T("millisecond") };
-_TCHAR * slice_names_plural[] = +_TCHAR * slice_names_plural[SLICES_COUNT] = { _T("years"), _T("months"), @@ -62,16 +64,16 @@
void print_uptime ( - uint64_t tickcount, - uint64_t prevsliceval, + uint64_ tickcount, + uint64_ prevsliceval, _TCHAR * prevsliceunit, int curslice ) { - uint64_t tick_cur = tickcount / ticks_per_slice[curslice]; - uint64_t tick_residual = tickcount % ticks_per_slice[curslice]; + uint64_ tick_cur = tickcount / ticks_per_slice[curslice]; + uint64_ tick_residual = tickcount % ticks_per_slice[curslice];
- assert(tick_cur <= (~((uint64_t)0))); + assert(tick_cur <= (~((uint64_)0)));
if(tick_residual == 0) { @@ -134,9 +136,56 @@ } }
-int _tmain() +int parse_print(const _TCHAR * str) { - print_uptime((uint64_t)GetTickCount(), 0, NULL, 0); + int64_ tickcount; + + tickcount = _ttoi64(str); + + if(tickcount < 0) + tickcount = - tickcount; + else if(tickcount == 0) + return 1; + + print_uptime(tickcount, 0, NULL, 0); _puttc(_T('\n'), stdout); + return 0; } + +int _tmain(int argc, _TCHAR * argv[]) +{ + int r; + + if(argc <= 1) + { + print_uptime((uint64_)GetTickCount(), 0, NULL, 0); + _puttc(_T('\n'), stdout); + } + else if(argc == 2 && argv[1][0] == _T('-') && argv[1][1] == 0) + { + while(!feof(stdin)) + { + _TCHAR buf[23]; + _TCHAR * str; + + str = _fgetts(buf, 22, stdin); + + if(str == NULL) + return 0; + + if((r = parse_print(str)) != 0) + return r; + } + } + else + { + int i; + + for(i = 1; i < argc; ++ i) + if((r = parse_print(argv[i])) != 0) + return r; + } + + return 0; +} _____
Modified: branches/xmlbuildsystem/reactos/baseaddress.cfg --- branches/xmlbuildsystem/reactos/baseaddress.cfg 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/baseaddress.cfg 2005-02-15 21:24:19 UTC (rev 13590) @@ -88,9 +88,9 @@
TARGET_BASE_LIB_ADVAPI32 =0x77dc0000 TARGET_BASE_LIB_USER32 =0x77e60000 TARGET_BASE_LIB_GDI32 =0x77ed0000 -TARGET_BASE_LIB_DNSAPI =0x78000000 +TARGET_BASE_LIB_DNSAPI =0x77f00000 TARGET_BASE_LIB_MSVCRT =0x78000000 -TARGET_BASE_LIB_MSVCRT20 =0x78000000 +TARGET_BASE_LIB_MSVCRT20 =0x78500000 TARGET_BASE_LIB_EXPAT =0x79000000 TARGET_BASE_LIB_KERNEL32 =0x7C800000 TARGET_BASE_LIB_NTDLL =0x7C900000 _____
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/CHANGELOG --- branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/CHANGELOG 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/CHANGELOG 2005-02-15 21:24:19 UTC (rev 13590) @@ -1,3 +1,9 @@
+Changes in v2.0.0 (02/07/2005) (alex ionesco) + +- PE loading of ntoskrnl.exe +- Work on 3GB support +- w32api conversion + Changes in v1.8.26 (10/30/2004) (chorns)
- Print stack frames on crashes. _____
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/Makefile --- branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/Makefile 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/Makefile 2005-02-15 21:24:19 UTC (rev 13590) @@ -83,7 +83,7 @@
$(CP) setupldr.sys $(BOOTCD_DIR)/disk/loader/setupldr.sys
-COMPILER_OPTIONS = -Wall -Werror -nostdlib -nostdinc -ffreestanding -fno-builtin -fno-inline \ +COMPILER_OPTIONS = -Wall -Werror -nostdlib -ffreestanding -fno-builtin -fno-inline \ -fno-zero-initialized-in-bss -O1 -MD # FreeLoader does not use any of the standard libraries, includes, or built-in functions
@@ -95,7 +95,7 @@
COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES)
-COMPILER_INCLUDES = -I$(SRCDIR)/include +COMPILER_INCLUDES = -I$(SRCDIR)/include -I$(PATH_TO_TOP)/w32api/include -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/ntoskrnl/include
CFLAGS = $(COMPILER_OPTIONS) \ $(COMPILER_DEFINES) \ @@ -262,9 +262,9 @@ @echo Make ALL done.
-freeldr.sys : $(ALL_OBJS) +freeldr.sys : $(ALL_OBJS) $(PATH_TO_TOP)/dk/w32/lib/librossym.a @echo ===================================================== LINKING $@ - @$(LD) $(LFLAGS) -o freeldr.exe $(F_OBJS) + @$(LD) $(LFLAGS) -o freeldr.exe $(F_OBJS) $(PATH_TO_TOP)/dk/w32/lib/librossym.a ifeq ($(FULL_MAP),yes) @$(OBJDUMP) -d -S freeldr.exe > freeldr.map else _____
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/archmach. c --- branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/archmach. c 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/archmach. c 2005-02-15 21:24:19 UTC (rev 13590) @@ -29,14 +29,14 @@
VOID MachInit(VOID) { - U32 PciId; + ULONG PciId;
memset(&MachVtbl, 0, sizeof(MACHVTBL));
/* Check for Xbox by identifying device at PCI 0:0:0, if it's * 0x10de/0x02a5 then we're running on an Xbox */ - WRITE_PORT_ULONG((U32*) 0xcf8, CONFIG_CMD(0, 0, 0)); - PciId = READ_PORT_ULONG((U32*) 0xcfc); + WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0)); + PciId = READ_PORT_ULONG((ULONG*) 0xcfc); if (0x02a510de == PciId) { XboxMachInit(); _____
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware. c --- branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware. c 2005-02-15 20:55:59 UTC (rev 13589) +++ branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware. c 2005-02-15 21:24:19 UTC (rev 13590) @@ -89,96 +89,43 @@
#define CONTROLLER_TIMEOUT 250
-typedef struct _CM_INT13_DRIVE_PARAMETER -{ - U16 DriveSelect; - U32 MaxCylinders; - U16 SectorsPerTrack; - U16 MaxHeads; - U16 NumberDrives; -} CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER; - - typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA { - U32 BytesPerSector; - U32 NumberOfCylinders; - U32 SectorsPerTrack; - U32 NumberOfHeads; + ULONG BytesPerSector; + ULONG NumberOfCylinders; + ULONG SectorsPerTrack; + ULONG NumberOfHeads; } CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA;
typedef struct _CM_PNP_BIOS_DEVICE_NODE { - U16 Size; - U8 Node; - U32 ProductId; - U8 DeviceType[3]; - U16 DeviceAttributes; + USHORT Size; + UCHAR Node; + ULONG ProductId; + UCHAR DeviceType[3]; + USHORT DeviceAttributes; } __attribute__((packed)) CM_PNP_BIOS_DEVICE_NODE, *PCM_PNP_BIOS_DEVICE_NODE;
typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK { - U8 Signature[4]; - U8 Revision; - U8 Length; - U16 ControlField; - U8 Checksum; - U32 EventFlagAddress; - U16 RealModeEntryOffset; - U16 RealModeEntrySegment; - U16 ProtectedModeEntryOffset; - U32 ProtectedModeCodeBaseAddress; - U32 OemDeviceId; - U16 RealModeDataBaseAddress; - U32 ProtectedModeDataBaseAddress; + UCHAR Signature[4]; + UCHAR Revision; + UCHAR Length; + USHORT ControlField; + UCHAR Checksum; + ULONG EventFlagAddress; + USHORT RealModeEntryOffset; + USHORT RealModeEntrySegment; + USHORT ProtectedModeEntryOffset; + ULONG ProtectedModeCodeBaseAddress; + ULONG OemDeviceId; + USHORT RealModeDataBaseAddress; + ULONG ProtectedModeDataBaseAddress; } __attribute__((packed)) CM_PNP_BIOS_INSTALLATION_CHECK, *PCM_PNP_BIOS_INSTALLATION_CHECK;
-typedef struct _CM_SERIAL_DEVICE_DATA -{ - U16 Version; - U16 Revision; - U32 BaudClock; -} __attribute__((packed)) CM_SERIAL_DEVICE_DATA, *PCM_SERIAL_DEVICE_DATA; - - -typedef struct _CM_FLOPPY_DEVICE_DATA -{ - U16 Version; - U16 Revision; - CHAR Size[8]; - U32 MaxDensity; - U32 MountDensity; - - /* Version 2.0 data */ - U8 StepRateHeadUnloadTime; - U8 HeadLoadTime; - U8 MotorOffTime; - U8 SectorLengthCode; - U8 SectorPerTrack; - U8 ReadWriteGapLength; - U8 DataTransferLength; - U8 FormatGapLength; - U8 FormatFillCharacter; - U8 HeadSettleTime; - U8 MotorSettleTime; - U8 MaximumTrackValue; - U8 DataTransferRate; -} __attribute__((packed)) CM_FLOPPY_DEVICE_DATA, *PCM_FLOPPY_DEVICE_DATA; - - -typedef struct _CM_KEYBOARD_DEVICE_DATA -{ - U16 Version; - U16 Revision; - U8 Type; - U8 Subtype; - U16 KeyboardFlags; -} __attribute__((packed)) CM_KEYBOARD_DEVICE_DATA, *PCM_KEYBOARD_DEVICE_DATA; - - static char Hex[] = "0123456789ABCDEF"; static unsigned int delay_count = 1;
@@ -187,28 +134,28 @@
static VOID -__KeStallExecutionProcessor(U32 Loops) +__StallExecutionProcessor(ULONG Loops) { register unsigned int i; for (i = 0; i < Loops; i++); }
-VOID KeStallExecutionProcessor(U32 Microseconds) +VOID StallExecutionProcessor(ULONG Microseconds) { - U64 LoopCount = ((U64)delay_count * (U64)Microseconds) / 1000ULL; - __KeStallExecutionProcessor((U32)LoopCount); + ULONGLONG LoopCount = ((ULONGLONG)delay_count * (ULONGLONG)Microseconds) / 1000ULL; + __StallExecutionProcessor((ULONG)LoopCount); }
-static U32 +static ULONG Read8254Timer(VOID) { - U32 Count; + ULONG Count;
- WRITE_PORT_UCHAR((PU8)0x43, 0x00); - Count = READ_PORT_UCHAR((PU8)0x40); - Count |= READ_PORT_UCHAR((PU8)0x40) << 8; + WRITE_PORT_UCHAR((PUCHAR)0x43, 0x00); + Count = READ_PORT_UCHAR((PUCHAR)0x40); + Count |= READ_PORT_UCHAR((PUCHAR)0x40) << 8;
return Count; } @@ -217,9 +164,9 @@ static VOID WaitFor8254Wraparound(VOID) { - U32 CurCount; - U32 PrevCount = ~0; - S32 Delta; + ULONG CurCount; + ULONG PrevCount = ~0; + LONG Delta;
CurCount = Read8254Timer();
@@ -242,14 +189,14 @@ VOID HalpCalibrateStallExecution(VOID) { - U32 i; - U32 calib_bit; - U32 CurCount; + ULONG i; + ULONG calib_bit; + ULONG CurCount;
/* Initialise timer interrupt with MILLISECOND ms interval */ - WRITE_PORT_UCHAR((PU8)0x43, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */ - WRITE_PORT_UCHAR((PU8)0x40, LATCH & 0xff); /* LSB */ - WRITE_PORT_UCHAR((PU8)0x40, LATCH >> 8); /* MSB */ + WRITE_PORT_UCHAR((PUCHAR)0x43, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */ + WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH & 0xff); /* LSB */ + WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH >> 8); /* MSB */
/* Stage 1: Coarse calibration */
@@ -262,7 +209,7 @@
WaitFor8254Wraparound();
- __KeStallExecutionProcessor(delay_count); /* Do the delay */ + __StallExecutionProcessor(delay_count); /* Do the delay */
CurCount = Read8254Timer(); } while (CurCount > LATCH / 2); @@ -281,7 +228,7 @@
WaitFor8254Wraparound();
- __KeStallExecutionProcessor(delay_count); /* Do the delay */ + __StallExecutionProcessor(delay_count); /* Do the delay */
CurCount = Read8254Timer(); if (CurCount <= LATCH / 2) /* If a tick has passed, turn the */ @@ -294,13 +241,13 @@
VOID -SetComponentInformation(HKEY ComponentKey, - U32 Flags, - U32 Key, - U32 Affinity) +SetComponentInformation(FRLDRHKEY ComponentKey, + ULONG Flags, + ULONG Key, + ULONG Affinity) { CM_COMPONENT_INFORMATION CompInfo; - S32 Error; + LONG Error;
CompInfo.Flags = Flags; CompInfo.Version = 0; @@ -311,7 +258,7 @@ Error = RegSetValue(ComponentKey, "Component Information", REG_BINARY, - (PU8)&CompInfo, + (PUCHAR)&CompInfo, sizeof(CM_COMPONENT_INFORMATION)); if (Error != ERROR_SUCCESS) { @@ -321,23 +268,23 @@
static VOID -DetectPnpBios(HKEY SystemKey, U32 *BusNumber) +DetectPnpBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PNP_BIOS_DEVICE_NODE DeviceNode; PCM_PNP_BIOS_INSTALLATION_CHECK InstData; char Buffer[80]; - HKEY BusKey; - U32 x; - U32 NodeSize = 0; - U32 NodeCount = 0; - U8 NodeNumber; - U32 FoundNodeCount; + FRLDRHKEY BusKey; + ULONG x; + ULONG NodeSize = 0; + ULONG NodeCount = 0; + UCHAR NodeNumber; + ULONG FoundNodeCount; int i; - U32 PnpBufferSize; - U32 Size; + ULONG PnpBufferSize; + ULONG Size; char *Ptr; - S32 Error; + LONG Error;
InstData = (PCM_PNP_BIOS_INSTALLATION_CHECK)PnpBiosSupported(); if (InstData == NULL || strncmp(InstData->Signature, "$PnP", 4)) @@ -351,6 +298,9 @@
x = PnpBiosGetDeviceNodeCount(&NodeSize, &NodeCount); + NodeCount &= 0xFF; // needed since some fscked up BIOSes return + // wrong info (e.g. Mac Virtual PC) + // e.g. look: http://my.execpc.com/~geezer/osd/pnp/pnp16.c if (x != 0 || NodeSize == 0 || NodeCount == 0) { DbgPrint((DPRINT_HWDETECT, "PnP-BIOS failed to enumerate device nodes\n")); @@ -385,7 +335,7 @@ Error = RegSetValue(BusKey, "Identifier", REG_SZ, - (PU8)"PNP BIOS", + (PUCHAR)"PNP BIOS", 9); if (Error != ERROR_SUCCESS) { @@ -425,7 +375,7 @@ PnpBufferSize = sizeof(CM_PNP_BIOS_INSTALLATION_CHECK); for (i = 0; i < 0xFF; i++) { - NodeNumber = (U8)i; + NodeNumber = (UCHAR)i;
x = PnpBiosGetDeviceNode(&NodeNumber, (PVOID)DISKREADBUFFER); if (x == 0) @@ -463,7 +413,7 @@ Error = RegSetValue(BusKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -477,15 +427,15 @@
static VOID -SetHarddiskConfigurationData(HKEY DiskKey, - U32 DriveNumber) +SetHarddiskConfigurationData(FRLDRHKEY DiskKey, + ULONG DriveNumber) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry; EXTENDED_GEOMETRY ExtGeometry; GEOMETRY Geometry; - U32 Size; - S32 Error; + ULONG Size; + LONG Error;
/* Set 'Configuration Data' value */ Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) + @@ -545,7 +495,7 @@ Error = RegSetValue(DiskKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -558,16 +508,16 @@
static VOID -SetHarddiskIdentifier(HKEY DiskKey, - U32 DriveNumber) +SetHarddiskIdentifier(FRLDRHKEY DiskKey, + ULONG DriveNumber) { PMASTER_BOOT_RECORD Mbr; - U32 *Buffer; - U32 i; - U32 Checksum; - U32 Signature; + ULONG *Buffer; + ULONG i; + ULONG Checksum; + ULONG Signature; char Identifier[20]; - S32 Error; + LONG Error;
/* Read the MBR */ if (!MachDiskReadLogicalSectors(DriveNumber, 0ULL, 1, (PVOID)DISKREADBUFFER)) @@ -576,7 +526,7 @@ return; }
- Buffer = (U32*)DISKREADBUFFER; + Buffer = (ULONG*)DISKREADBUFFER; Mbr = (PMASTER_BOOT_RECORD)DISKREADBUFFER;
Signature = Mbr->Signature; @@ -618,7 +568,7 @@ Error = RegSetValue(DiskKey, "Identifier", REG_SZ, - (PU8) Identifier, + (PUCHAR) Identifier, 20); if (Error != ERROR_SUCCESS) { @@ -630,18 +580,18 @@
static VOID -DetectBiosDisks(HKEY SystemKey, - HKEY BusKey) [truncated at 1000 lines; 215613 more skipped]