--- projects/cms/source/ihost/libstatgrab/disk_stat.c 2002/05/16 17:02:43 1.6 +++ projects/cms/source/ihost/libstatgrab/disk_stat.c 2002/05/19 12:33:53 1.8 @@ -1,3 +1,22 @@ +/* + * i-scream central monitoring system + * Copyright (C) 2000-2002 i-scream + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #include #include #include "ukcprog.h" @@ -134,6 +153,12 @@ char *get_disk_stats(){ sd_ptr->next_disk=sd; sd=sd_ptr; } + + if ((fclose(f)) != 0) { + errf("Failed to close file (%m)"); + return NULL; + } + #endif #ifdef FREEBSD nummnt=getmntinfo(&mp , MNT_LOCAL);