Rebase against ababea0fd7036ab13ec17d31afbd584c39f62696.

This commit is contained in:
Zebediah Figura
2021-10-26 00:04:29 -05:00
parent 3fb6eb99a7
commit 1295604add
10 changed files with 149 additions and 290 deletions

View File

@@ -1,4 +1,4 @@
From 18053994fa047259217523879c13ee0c44c681d5 Mon Sep 17 00:00:00 2001
From 3d93f5c74201ecde76a8bc7d53a3b80ae51344bb Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Wed, 5 Aug 2020 09:09:45 +0200
Subject: [PATCH] systeminfo: add basic functionality
@@ -20,7 +20,7 @@ index 6ddd309b2ef..a3c65f0a6c6 100644
EXTRADLLFLAGS = -mconsole -municode
diff --git a/programs/systeminfo/main.c b/programs/systeminfo/main.c
index b633134a393..c913aab3d91 100644
index b633134a393..d5ff7f4def4 100644
--- a/programs/systeminfo/main.c
+++ b/programs/systeminfo/main.c
@@ -1,5 +1,7 @@
@@ -74,7 +74,7 @@ index b633134a393..c913aab3d91 100644
+ { L"", L"~", L"Win32_Processor", L"MaxClockSpeed", L"Mhz"}
+};
+
+static int sysinfo_vprintfW(const WCHAR *msg, __ms_va_list va_args)
+static int sysinfo_vprintfW(const WCHAR *msg, va_list va_args)
+{
+ int wlen;
+ DWORD count, ret;
@@ -109,12 +109,12 @@ index b633134a393..c913aab3d91 100644
+
+static int WINAPIV sysinfo_printfW(const WCHAR *msg, ...)
+{
+ __ms_va_list va_args;
+ va_list va_args;
+ int len;
+
+ __ms_va_start(va_args, msg);
+ va_start(va_args, msg);
+ len = sysinfo_vprintfW(msg, va_args);
+ __ms_va_end(va_args);
+ va_end(va_args);
+
+ return len;
+}
@@ -219,7 +219,11 @@ index b633134a393..c913aab3d91 100644
{
int i;
+ BOOL csv = FALSE;
+
- WINE_FIXME("stub:");
- for (i = 0; i < argc; i++)
- WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
- WINE_FIXME("\n");
+ for (i = 1; i < argc; i++)
+ {
+ if ( !wcsicmp( argv[i], L"/fo" ) && !wcsicmp( argv[i+1], L"csv" ) )
@@ -228,10 +232,6 @@ index b633134a393..c913aab3d91 100644
+ WINE_FIXME( "command line switch %s not supported\n", debugstr_w(argv[i]) );
+ }
- WINE_FIXME("stub:");
- for (i = 0; i < argc; i++)
- WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
- WINE_FIXME("\n");
+ if( !csv )
+ {
+ for ( i = 0; i < ARRAYSIZE(pq); i++ )
@@ -254,7 +254,7 @@ index b633134a393..c913aab3d91 100644
+ sysinfo_printfW( i ? L",\"%s\"" : L"\"%s\"", pq[i].row_name );
+ }
+ sysinfo_printfW( L"\r\n" );
+
+ for (i = 0; i < ARRAYSIZE(pq); i++)
+ {
+ if ( wcslen(pq[i].row_name) )