]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - lib/caputils.c
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2, or (at your option) any
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * General Public License for more details.
12 * You should have received a copy of the GNU General Public License along
13 * with this program; if not, write to the Free Software Foundation, Inc.,
14 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "pathnames.h"
22 int cap_last_cap(void)
24 /* CAP_LAST_CAP is untrustworthy. */
32 f
= fopen(_PATH_PROC_CAPLASTCAP
, "r");
34 ret
= CAP_LAST_CAP
; /* guess */
38 matched
= fscanf(f
, "%d", &ret
);
42 ret
= CAP_LAST_CAP
; /* guess */