TS_OPEN_RESTRICTED(3)
π ts_open_restricted β the manual page, but make it make sense π
okay bestie, welcome to tslib's ts_open_restricted(3) page, except now it's fun and also you'll actually remember it. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
ts_open_restricted β the way you plug in your own little custom function for opening the touchscreen's input device file. yes, YOUR function. you're the main character now π
πΈ SYNOPSIS πΈ
#include <tslib.h>
int (*ts_open_restricted)(const char *path, int flags, void *user_data);
that's it, that's the whole vibe. a function pointer, living its best life β¨
π¦ DESCRIPTION π¦
so ts_open_restricted() is the icon we call when libts should not be run as root. like, imagine not wanting your whole touchscreen stack to have god-mode privileges. valid. iconic. security-conscious π
if you implement a function like this yourself and assign it to the ts_open_restricted pointer, then ts_open() will call your function instead of hitting the open() system call directly. the way that works is literally chef's kiss π
your function should open the input device at path with flags, while user_data is currently unused. that's it. do your thing, bestie π
heads up: user_data is currently unused β don't go building your whole personality around it, fr fr π
β RETURN VALUE β
the touchscreen input device's file descriptor. give it back, it's what the people want π«Ά
π₯ SEE ALSO π₯
go read those too, they're all part of the same friendship group π
and that's the whole page, bestie!! this one came out of the tslib crew β the ts_open_restricted(3) page, tslib edition, no cap π
β¨
π¦ 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