--- projects/cms/source/ihost/libstatgrab/os_info.c 2002/05/13 14:42:11 1.1 +++ projects/cms/source/ihost/libstatgrab/os_info.c 2002/05/18 18:15:56 1.4 @@ -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 @@ -9,6 +28,7 @@ #include #include #include +#include #endif char *get_os_info(){ @@ -27,6 +47,7 @@ char *get_os_info(){ #ifdef FREEBSD struct timeval boottime; time_t curtime; + size_t size; #endif if((uname(&os)) < 0){ errf("Failed to get os stats (%m)"); @@ -90,13 +111,7 @@ char *get_os_info(){ #endif - xml_os_info=strf("%s%s%s%s%s%ld", os.sysname, os.release, os.version, os.nodename, os.machine, uptime); + xml_os_info=strf("%s%s%s%s%s%ld", os.sysname, os.release, os.version, os.nodename, os.machine, uptime); - printf("%s\n",xml_os_info); return xml_os_info; -} - -int main(){ - get_os_info(); - exit(0); }