Projects STRLCPY criu Commits 245b4b36
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    criu/files.c
    skipped 406 lines
    407 407   
    408 408  static int dump_chrdev(struct fd_parms *p, int lfd, struct cr_img *img)
    409 409  {
     410 + struct fd_link *link_old = p->link;
    410 411   int maj = major(p->stat.st_rdev);
    411 412   const struct fdtype_ops *ops;
     413 + struct fd_link link;
     414 + int err;
    412 415   
    413 416   switch (maj) {
    414 417   case MEM_MAJOR:
    skipped 8 lines
    423 426   char more[32];
    424 427   
    425 428   if (is_tty(p->stat.st_rdev, p->stat.st_dev)) {
    426  - struct fd_link link;
    427  - 
    428 429   if (fill_fdlink(lfd, p, &link))
    429 430   return -1;
    430 431   p->link = &link;
    skipped 2 lines
    433 434   }
    434 435   
    435 436   sprintf(more, "%d:%d", maj, minor(p->stat.st_rdev));
    436  - return dump_unsupp_fd(p, lfd, img, "chr", more);
     437 + err = dump_unsupp_fd(p, lfd, img, "chr", more);
     438 + p->link = link_old;
     439 + return err;
    437 440   }
    438 441   }
    439 442   
    440  - return do_dump_gen_file(p, lfd, ops, img);
     443 + err = do_dump_gen_file(p, lfd, ops, img);
     444 + p->link = link_old;
     445 + return err;
    441 446  }
    442 447   
    443 448  static int dump_one_file(struct pid *pid, int fd, int lfd, struct fd_opts *opts,
    skipped 1220 lines
Please wait...
Page is in error, reload to recover