--- projects/libstatgrab/src/libstatgrab/os_info.c 2004/04/07 21:08:40 1.18 +++ projects/libstatgrab/src/libstatgrab/os_info.c 2004/07/18 21:30:11 1.19 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: os_info.c,v 1.18 2004/04/07 21:08:40 tdb Exp $ + * $Id: os_info.c,v 1.19 2004/07/18 21:30:11 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -69,7 +69,7 @@ sg_host_info *sg_get_host_info(){ #endif if((uname(&os)) < 0){ - sg_set_error(SG_ERROR_UNAME, NULL); + sg_set_error_with_errno(SG_ERROR_UNAME, NULL); return NULL; } @@ -106,7 +106,7 @@ sg_host_info *sg_get_host_info(){ #endif #if defined(LINUX) || defined(CYGWIN) if ((f=fopen("/proc/uptime", "r")) == NULL) { - sg_set_error(SG_ERROR_OPEN, "/proc/uptime"); + sg_set_error_with_errno(SG_ERROR_OPEN, "/proc/uptime"); return NULL; } if((fscanf(f,"%lu %*d",&general_stat.uptime)) != 1){ @@ -120,7 +120,8 @@ sg_host_info *sg_get_host_info(){ mib[1] = KERN_BOOTTIME; size = sizeof boottime; if (sysctl(mib, 2, &boottime, &size, NULL, 0) < 0){ - sg_set_error(SG_ERROR_SYSCTL, "CTL_KERN.KERN_BOOTTIME"); + sg_set_error_with_errno(SG_ERROR_SYSCTL, + "CTL_KERN.KERN_BOOTTIME"); return NULL; } time(&curtime);