X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ffd-limit.c;h=973f7d74aa2acd76f4aaef764f11807cb461676b;hb=28b3dc1e1eca004cae6023b8e491835ecdfdd041;hp=a886d33b9c9d49cb9a84319c2ade68244b38d06a;hpb=4063050c0e90b27d34ee8de570b049cc076119a4;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/fd-limit.c b/src/bin/lttng-sessiond/fd-limit.c index a886d33b9..973f7d74a 100644 --- a/src/bin/lttng-sessiond/fd-limit.c +++ b/src/bin/lttng-sessiond/fd-limit.c @@ -1,27 +1,18 @@ /* - * Copyright (C) 2012 - Mathieu Desnoyers + * Copyright (C) 2012 Mathieu Desnoyers * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include -#include #include #include "fd-limit.h" +#include +#include /* total count of fd. */ static long fd_count; @@ -64,7 +55,7 @@ void lttng_fd_init(void) ret = getrlimit(RLIMIT_NOFILE, &rlim); if (ret < 0) { - perror("getrlimit"); + PERROR("getrlimit"); } max_nr_fd = rlim.rlim_cur; }