You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
server-Registry_Timestamp: Some style improvements.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
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: server: Increase precision when saving / loading registry
|
||||
modification date
|
||||
|
||||
---
|
||||
server/registry.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
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
|
||||
{
|
||||
fprintf( f, "\n[" );
|
||||
if (key != base) dump_path( key, base, f );
|
||||
- fprintf( f, "] %u\n", (unsigned int)((key->modif - ticks_1601_to_1970) / TICKS_PER_SEC) );
|
||||
+ fprintf( f, "] %u %u\n", (unsigned int)((key->modif - ticks_1601_to_1970) / TICKS_PER_SEC),
|
||||
+ (unsigned int)((key->modif - ticks_1601_to_1970) % TICKS_PER_SEC) );
|
||||
if (key->class)
|
||||
{
|
||||
fprintf( f, "#class=\"" );
|
||||
@@ -1346,8 +1347,8 @@ static struct key *load_key( struct key *base, const char *buffer,
|
||||
{
|
||||
WCHAR *p;
|
||||
struct unicode_str name;
|
||||
- int res;
|
||||
- unsigned int mod;
|
||||
+ int res, num_items;
|
||||
+ unsigned int mod, mod_ticks;
|
||||
timeout_t modif = current_time;
|
||||
data_size_t len;
|
||||
|
||||
@@ -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;
|
||||
+ 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--; }
|
||||
--
|
||||
2.4.5
|
||||
|
||||
1
patches/server-Registry_Timestamp/definition
Normal file
1
patches/server-Registry_Timestamp/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [38927] Store registry timestamps with nanoseconds precision
|
||||
Reference in New Issue
Block a user