vmm: fix a typo in ioctl name

Rename TIOCGTPEER ioctl to it proper name:TIOCGPTPEER.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
Praveen K Paladugu 2024-05-22 21:31:31 +00:00 committed by Rob Bradford
parent a8fa2af64b
commit 11d98fccac
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ use std::sync::Mutex;
use thiserror::Error;
const TIOCSPTLCK: libc::c_int = 0x4004_5431;
const TIOCGTPEER: libc::c_int = 0x5441;
const TIOCGPTPEER: libc::c_int = 0x5441;
/// Errors associated with console devices
#[derive(Debug, Error)]
@ -151,7 +151,7 @@ fn create_pty() -> io::Result<(File, File, PathBuf)> {
let sub_fd = unsafe {
libc::ioctl(
main.as_raw_fd(),
TIOCGTPEER as _,
TIOCGPTPEER as _,
libc::O_NOCTTY | libc::O_RDWR,
)
};

View File

@ -47,7 +47,7 @@ const TIOCGPGRP: u64 = 0x540F;
const TIOCSPGRP: u64 = 0x5410;
const TIOCGWINSZ: u64 = 0x5413;
const TIOCSPTLCK: u64 = 0x4004_5431;
const TIOCGTPEER: u64 = 0x5441;
const TIOCGPTPEER: u64 = 0x5441;
const FIOCLEX: u64 = 0x5451;
const FIONBIO: u64 = 0x5421;
@ -323,7 +323,7 @@ fn create_vmm_ioctl_seccomp_rule_common(
and![Cond::new(1, ArgLen::Dword, Eq, TCSETS)?],
and![Cond::new(1, ArgLen::Dword, Eq, TCGETS)?],
and![Cond::new(1, ArgLen::Dword, Eq, TIOCGPGRP)?],
and![Cond::new(1, ArgLen::Dword, Eq, TIOCGTPEER)?],
and![Cond::new(1, ArgLen::Dword, Eq, TIOCGPTPEER)?],
and![Cond::new(1, ArgLen::Dword, Eq, TIOCGWINSZ)?],
and![Cond::new(1, ArgLen::Dword, Eq, TIOCSCTTY)?],
and![Cond::new(1, ArgLen::Dword, Eq, TIOCSPGRP)?],