TS_CLOSE_RESTRICTED(3)
β¨ TS_CLOSE_RESTRICTED(3) β¨
okay so bestie, welcome to the tslib manual, section 3, and today's main character is ts_close_restricted π
π NAME π
ts_close_restricted β the way you drop in your own custom function for closing the touchscreen's input device file π«Ά
πΈ SYNOPSIS πΈ
#include <tslib.h>
void (*ts_close_restricted)(int fd, void *user_data);
π DESCRIPTION π
so here's the vibe: ts_close_restricted() is useful if libts should not be run as root. like, imagine not wanting to hand root privileges to your touchscreen library β valid, honestly, iconic even π
if you (the user) implement a function like that and assign it to the ts_close_restricted pointer, then ts_close() will call your function instead of hitting the close() system call directly. no cap. it's literally a little swap-in-and-slay situation π₯
and what should that function do? it should obviously close the device with file descriptor fd π meanwhile user_data is currently unused β so yeah, it's just kinda sitting there looking cute, not doing anything yet π
not me making you read a whole paragraph for "close the fd but make it custom" π but fr fr, every word of it matters.
π¦ SEE ALSO π¦
mwah, that's the whole page, bestie π this lil masterpiece lives in the tslib manual, section 3, and it signs off the same way it came in: TS_CLOSE_RESTRICTED(3) β¨ go forth and close your fds responsibly π
π¦ where this page comes from
- alpine 3.24: tslib-doc 1.24-r0 Β· LGPL-2.0-or-later
- arch rolling: tslib 1.24-1 Β· LGPL-2.1-only
- debian bookworm: libts0 1.22-1+b1 Β· LGPL-2.0-or-later
- debian trixie: libts0t64 1.22-1.1+b1 Β· LGPL-2.0-or-later
- epel 10: tslib 1.23-2.el10_2 Β· LGPL-2.1-only
- epel 9: tslib 1.22-5.el9 Β· LGPLv2
- fedora 43: tslib 1.23-2.fc43 Β· LGPL-2.1-only
- fedora 43: tslib 1.23-2.fc43 Β· LGPL-2.1-only
- fedora 44: tslib 1.24-2.fc44 Β· LGPL-2.1-only
- fedora 44: tslib 1.24-2.fc44 Β· LGPL-2.1-only
- nixos 26.05: tslib 1.24
- nixpkgs unstable: tslib 1.24
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- ubuntu jammy: libts0 1.22-1 Β· LGPL-2.0-or-later
- ubuntu noble: libts0t64 1.22-1.1build1 Β· LGPL-2.0-or-later
- ubuntu questing: libts0t64 1.22-1.1build1
- ubuntu resolute: libts0t64 1.22-1.1build2 Β· LGPL-2.0-or-later
- ubuntu stonking: libts0t64 1.22-1.1build2 Β· LGPL-2.0-or-later
- Copyright (c) 2017, Martin Kepplinger <martink@posteo.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms