[CRIU] [PATCH 2/9] files: Add ability to use read link in dump_one_reg_file
Cyrill Gorcunov
gorcunov at openvz.org
Fri May 17 09:58:02 EDT 2013
On Fri, May 17, 2013 at 05:43:41PM +0400, Pavel Emelyanov wrote:
>
> > + if (!p->link) {
> > + if (fill_fdlink(lfd, (struct fd_parms *)p, &_link, false))
>
> What is this cast for? To facilitate the fill_fdlink prototype?
> Plz, remove this ugly bool assign and always assign it there.
Sigh. I can't. We call for fill_fdlink in two places
- dump_one_file
struct fd_link link;
if (fill_fdlink(lfd, &p, &link, true))
here fd_parms is not constant
- dump_one_reg_file
if (fill_fdlink(lfd, (struct fd_parms *)p, &_link, false))
here fd_parms is a const pointer, and if I assign
pointer inside fill_fdlink the result is bogus,
i think gcc has special paths for const optimisations
More information about the CRIU
mailing list