One Hat Cyber Team
Your IP :
216.73.216.216
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
systemtap
/
examples
/
stapgames
/
tapset
/
View File Name :
gmtty.stp
# TTY related routines for games # Copyright (C) 2011 Masami Hiramatsu <masami.hiramatsu@gmail.com> # # This file is free software and is distributed under the terms of the GNU # General Public License (GPL); either version 2, or (at your option) any # later version. global GM_tty_ws_row, GM_tty_ws_col, GM_tty_name # Initialize current TTY -- must be called from begin function game_tty_init:long () { tty = @cast(task_current(), "task_struct", "kernel")->signal->tty if (tty) { namep = @cast(tty,"tty_struct", "kernel")->name GM_tty_name = kernel_string(namep) GM_tty_ws_col = @cast(tty, "tty_struct", "kernel")->winsize->ws_col GM_tty_ws_row = @cast(tty, "tty_struct", "kernel")->winsize->ws_row } return tty } probe begin(-100) { if (game_tty_init() == 0) { print("Failed to get current tty\n") exit() } } probe game.tty.resize = kernel.function("tty_do_resize") { if (kernel_string($tty->name) == GM_tty_name) { row = $ws->ws_row col = $ws->ws_col } } probe game.tty.resize { GM_tty_ws_row = row GM_tty_ws_col = col } function game_tty_ws_row:long () { return GM_tty_ws_row } function game_tty_ws_col:long () { return GM_tty_ws_col }