[CRIU] [crtools-bot for Cyrill Gorcunov ] dump: Clenaup recently added file-ids code

Cyrill Gorcunov gorcunov at openvz.org
Wed Feb 29 10:22:35 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 29a7a81d25e9553b8cbeb2e78796908d5de7fda0
Author: Cyrill Gorcunov <gorcunov at openvz.org>
Date:   Wed Feb 29 19:22:35 2012 +0400

    dump: Clenaup recently added file-ids code
    
     - drop double file-ids.h inclusion
     - rename fd_id_entry to plain entry, it's
       used just in a couple of lines only, no
       need for complex name
    
    Reported-by: Kir Kolyshkin <kir at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-dump.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index 44dc039..b99e023 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -32,7 +32,6 @@
 #include "image.h"
 #include "proc_parse.h"
 #include "parasite-syscall.h"
-#include "file-ids.h"
 
 #ifndef CONFIG_X86_64
 # error No x86-32 support yet
@@ -126,20 +125,20 @@ static int dump_one_reg_file(int type, struct fd_parms *p, int lfd,
 	e.addr	= p->fd_name;
 
 	if (likely(!fd_is_special(&e))) {
-		struct fd_id_entry *fd_id_entry;
+		struct fd_id_entry *entry;
 
 		/*
 		 * Make sure the union is still correlate with structure
 		 * we write to disk.
 		 */
-		BUILD_BUG_ON(sizeof(fd_id_entry->u.key) != sizeof(e.id));
+		BUILD_BUG_ON(sizeof(entry->u.key) != sizeof(e.id));
 
-		fd_id_entry = fd_id_entry_collect((u32)p->id, p->pid, p->fd_name);
-		if (!fd_id_entry)
+		entry = fd_id_entry_collect((u32)p->id, p->pid, p->fd_name);
+		if (!entry)
 			goto err;
 
 		/* Now it might have completely new ID here */
-		e.id	= fd_id_entry->u.id;
+		e.id	= entry->u.id;
 	} else
 		e.id	= FD_ID_INVALID;
 


More information about the CRIU mailing list