summaryrefslogtreecommitdiffstats
path: root/sbin/kget
diff options
context:
space:
mode:
authorabial <abial@FreeBSD.org>1999-05-09 22:16:27 +0000
committerabial <abial@FreeBSD.org>1999-05-09 22:16:27 +0000
commit74ec218cdf2d445ac816dd829bf779d31f65bf8a (patch)
treeed043f4a310d8a20e23c8a83153800021c185b62 /sbin/kget
parent77f650ef5f3f98911da699e5d7dfcaf29c1841ab (diff)
downloadFreeBSD-src-74ec218cdf2d445ac816dd829bf779d31f65bf8a.zip
FreeBSD-src-74ec218cdf2d445ac816dd829bf779d31f65bf8a.tar.gz
Silence message about absence of PnP overrides.
Diffstat (limited to 'sbin/kget')
-rw-r--r--sbin/kget/kget.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/kget/kget.c b/sbin/kget/kget.c
index b7c779f..5b9f4c7 100644
--- a/sbin/kget/kget.c
+++ b/sbin/kget/kget.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kget.c,v 1.3 1999/02/12 20:36:09 abial Exp $
+ * $Id: kget.c,v 1.1 1999/02/27 02:24:18 jkh Exp $
*/
#include <stdio.h>
@@ -115,8 +115,8 @@ main(int argc, char *argv[])
/* get the buffer size */
i=sysctlbyname(mib2,NULL,&len,NULL,NULL);
if(i) {
- perror("buffer sizing");
- exit(-1);
+ /* Hmm.. No PnP table? */
+ goto finish;
}
buf=(char *)malloc(len*sizeof(char));
i=sysctlbyname(mib2,buf,&len,NULL,NULL);
@@ -157,8 +157,9 @@ main(int argc, char *argv[])
}
} while ((i+=sizeof(struct pnp_cinfo))<len);
+ free(buf);
+finish:
fprintf(fout,"q\n");
fclose(fout);
- free(buf);
exit(0);
}
OpenPOWER on IntegriCloud