2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 23:05:39 +00:00

file-ids: Fix collect genid type

It is u32 and that is it :\

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-03-24 17:00:06 +04:00
parent ed67491c45
commit 308f6150c2
3 changed files with 4 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ static int dump_one_reg_file(const struct fd_parms *p, int lfd,
if (likely(!fd_is_special(&e))) { if (likely(!fd_is_special(&e))) {
u64 id; u64 id;
id = fd_id_entry_collect((u32)p->id, p->pid, p->fd_name); id = fd_id_entry_collect(p->id, p->pid, p->fd_name);
if (id < 0) if (id < 0)
goto err; goto err;

View File

@@ -191,7 +191,7 @@ err:
return sub; return sub;
} }
static struct fd_id_entry *lookup_alloc_node(u64 genid, pid_t pid, int fd) static struct fd_id_entry *lookup_alloc_node(u32 genid, pid_t pid, int fd)
{ {
struct rb_node *node = fd_id_root.rb_node; struct rb_node *node = fd_id_root.rb_node;
struct fd_id_entry *e = NULL; struct fd_id_entry *e = NULL;
@@ -221,7 +221,7 @@ err:
} }
long fd_id_entry_collect(u64 genid, pid_t pid, int fd) long fd_id_entry_collect(u32 genid, pid_t pid, int fd)
{ {
struct fd_id_entry *e = NULL; struct fd_id_entry *e = NULL;

View File

@@ -11,7 +11,7 @@
#define MAKE_FD_GENID(dev, ino, pos) \ #define MAKE_FD_GENID(dev, ino, pos) \
(((u32)(dev) ^ (u32)(ino) ^ (u32)(pos))) (((u32)(dev) ^ (u32)(ino) ^ (u32)(pos)))
extern long fd_id_entry_collect(u64 genid, pid_t pid, int fd); extern long fd_id_entry_collect(u32 genid, pid_t pid, int fd);
extern void fd_id_show_tree(void); extern void fd_id_show_tree(void);
#endif /* FILE_IDS_H__ */ #endif /* FILE_IDS_H__ */