perror(_PATH_PROCNET_DEV); return -1; }
fprintf(stderr, _("Warning: cannot open %s (%s). Limited output.\n"), _PATH_PROCNET_DEV, strerror(errno)); return if_readconf(); }
int if_readlist(void){    FILE *fh;    char buf[512];    struct interface *ife;    int err;    fh = fopen(_PATH_PROCNET_DEV, "r");    if (!fh) {	perror(_PATH_PROCNET_DEV);	return -1;    }    fgets(buf, sizeof buf, fh);	/* eat line */    fgets(buf, sizeof buf, fh);#if 0				/* pretty, but can't cope with missing fields */    fmt = proc_gen_fmt(_PATH_PROCNET_DEV, 1, fh,		       "face", "",	/* parsed separately */		       "bytes", "%lu",		       "packets", "%lu",		       "errs", "%lu",		       "drop", "%lu",		       "fifo", "%lu",		       "frame", "%lu",		       "compressed", "%lu",		       "multicast", "%lu",		       "bytes", "%lu",		       "packets", "%lu",		       "errs", "%lu",		       "drop", "%lu",		       "fifo", "%lu",		       "colls", "%lu",		       "carrier", "%lu",		       "compressed", "%lu",		       NULL);    if (!fmt)	return -1;#else    procnetdev_vsn = procnetdev_version(buf);#endif    err = 0;    while (fgets(buf, sizeof buf, fh)) {	char *s;	new(ife);	s = get_name(ife->name, buf);	get_dev_fields(s, ife);	ife->statistics_valid = 1;	add_interface(ife);    }    if (ferror(fh)) {	perror(_PATH_PROCNET_DEV);	err = -1;    }    if (!err)	err = if_readconf();#if 0    free(fmt);#endif    return err;}