[CRIU] [PATCH 2/2] tty: Use is_service_fd where appropriate
Cyrill Gorcunov
gorcunov at openvz.org
Wed Sep 12 12:14:58 EDT 2012
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
files.c | 2 +-
tty.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/files.c b/files.c
index ebc4569..c1972e3 100644
--- a/files.c
+++ b/files.c
@@ -377,7 +377,7 @@ static int post_open_fd(int pid, FdinfoEntry *fe, struct file_desc *d)
if (!d->ops->post_open)
return 0;
- if (fe->fd == get_service_fd(CTL_TTY_OFF))
+ if (is_service_fd(fe->fd, CTL_TTY_OFF))
return d->ops->post_open(d, fe->fd);
fle = file_master(d);
diff --git a/tty.c b/tty.c
index d19ba75..ae8045c 100644
--- a/tty.c
+++ b/tty.c
@@ -345,7 +345,7 @@ static int tty_restore_ctl_terminal(struct file_desc *d, int fd)
int slave, ret = -1;
char pts_name[64];
- if (fd != get_service_fd(CTL_TTY_OFF))
+ if (!is_service_fd(fd, CTL_TTY_OFF))
return 0;
snprintf(pts_name, sizeof(pts_name), PTS_FMT, info->tie->pty->index);
--
1.7.7.6
More information about the CRIU
mailing list