server-Registry_Timestamp: Some style improvements.

This commit is contained in:
Sebastian Lackner 2015-07-29 07:30:27 +02:00
parent c23d8e2738
commit 9454f5fc78
3 changed files with 45 additions and 46 deletions

View File

@ -210,6 +210,7 @@ patch_enable_all ()
enable_server_OpenProcess="$1"
enable_server_PeekMessage="$1"
enable_server_Realtime_Priority="$1"
enable_server_Registry_Timestamp="$1"
enable_server_RootDirectory_File="$1"
enable_server_Shared_Memory="$1"
enable_server_Stored_ACLs="$1"
@ -266,7 +267,6 @@ patch_enable_all ()
enable_winedevice_Fix_Relocation="$1"
enable_winemenubuilder_Desktop_Icon_Path="$1"
enable_winepulse_PulseAudio_Support="$1"
enable_wineserver_Registry_Timestamp="$1"
enable_winex11_CandidateWindowPos="$1"
enable_winex11_Clipboard_HTML="$1"
enable_winex11_DragAndDrop="$1"
@ -709,6 +709,9 @@ patch_enable ()
server-Realtime_Priority)
enable_server_Realtime_Priority="$2"
;;
server-Registry_Timestamp)
enable_server_Registry_Timestamp="$2"
;;
server-RootDirectory_File)
enable_server_RootDirectory_File="$2"
;;
@ -877,9 +880,6 @@ patch_enable ()
winepulse-PulseAudio_Support)
enable_winepulse_PulseAudio_Support="$2"
;;
wineserver-Registry_Timestamp)
enable_wineserver_Registry_Timestamp="$2"
;;
winex11-CandidateWindowPos)
enable_winex11_CandidateWindowPos="$2"
;;
@ -4308,6 +4308,21 @@ if test "$enable_server_Realtime_Priority" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Registry_Timestamp
# |
# | This patchset fixes the following Wine bugs:
# | * [#38927] Store registry timestamps with nanoseconds precision
# |
# | Modified files:
# | * server/registry.c
# |
if test "$enable_server_Registry_Timestamp" -eq 1; then
patch_apply server-Registry_Timestamp/0001-server-Increase-precision-when-saving-loading-regist.patch
(
echo '+ { "Michael Müller", "server: Increase precision when saving / loading registry modification date.", 1 },';
) >> "$patchlist"
fi
# Patchset server-Shared_Memory
# |
# | Modified files:
@ -4915,6 +4930,18 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-UnhandledBlendFactor
# |
# | Modified files:
# | * dlls/wined3d/state.c
# |
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-resource_check_usage
# |
# | Modified files:
@ -5014,18 +5041,6 @@ if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-UnhandledBlendFactor
# |
# | Modified files:
# | * dlls/wined3d/state.c
# |
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset fixes the following Wine bugs:
@ -5516,21 +5531,6 @@ if test "$enable_winepulse_PulseAudio_Support" -eq 1; then
) >> "$patchlist"
fi
# Patchset wineserver-Registry_Timestamp
# |
# | This patchset fixes the following Wine bugs:
# | * [#38927] Store registry timestamps with nanoseconds precision
# |
# | Modified files:
# | * server/registry.c
# |
if test "$enable_wineserver_Registry_Timestamp" -eq 1; then
patch_apply wineserver-Registry_Timestamp/0001-wineserver-Increase-precision-when-saving-loading-re.patch
(
echo '+ { "Michael Müller", "wineserver: Increase precision when saving / loading registry modification date.", 1 },';
) >> "$patchlist"
fi
# Patchset winex11-CandidateWindowPos
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,15 +1,15 @@
From b802fbbf522c400c30d26170152daa5e1f41f94d Mon Sep 17 00:00:00 2001
From 0cbf2798faf44d394601702bbfe97c7804c623d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 28 Jul 2015 17:46:13 +0200
Subject: wineserver: Increase precision when saving / loading registry
Subject: server: Increase precision when saving / loading registry
modification date
---
server/registry.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
server/registry.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/server/registry.c b/server/registry.c
index 43527df..45eebb8 100644
index 43527df..68862a1 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -264,7 +264,8 @@ static void save_subkeys( const struct key *key, const struct key *base, FILE *f
@ -22,27 +22,26 @@ index 43527df..45eebb8 100644
if (key->class)
{
fprintf( f, "#class=\"" );
@@ -1347,9 +1348,10 @@ static struct key *load_key( struct key *base, const char *buffer,
@@ -1346,8 +1347,8 @@ static struct key *load_key( struct key *base, const char *buffer,
{
WCHAR *p;
struct unicode_str name;
int res;
- int res;
- unsigned int mod;
+ unsigned int mod, mod_nano;
+ int res, num_items;
+ unsigned int mod, mod_ticks;
timeout_t modif = current_time;
data_size_t len;
+ int elements;
if (!get_file_tmp_space( info, strlen(buffer) * sizeof(WCHAR) )) return NULL;
@@ -1359,8 +1361,9 @@ static struct key *load_key( struct key *base, const char *buffer,
@@ -1359,8 +1360,9 @@ static struct key *load_key( struct key *base, const char *buffer,
file_read_error( "Malformed key", info );
return NULL;
}
- if (sscanf( buffer + res, " %u", &mod ) == 1)
- modif = (timeout_t)mod * TICKS_PER_SEC + ticks_1601_to_1970;
+ elements = sscanf( buffer + res, " %u %u", &mod, &mod_nano );
+ if (elements >= 1) modif = (timeout_t)mod * TICKS_PER_SEC + ticks_1601_to_1970;
+ if (elements >= 2) modif += mod_nano;
+ num_items = sscanf( buffer + res, " %u %u", &mod, &mod_ticks );
+ if (num_items >= 1) modif = (timeout_t)mod * TICKS_PER_SEC + ticks_1601_to_1970;
+ if (num_items >= 2) modif += mod_ticks;
p = info->tmp;
while (prefix_len && *p) { if (*p++ == '\\') prefix_len--; }