Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Nov 2010 11:14:06 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r215555 - stable/8/sbin/kldstat
Message-ID:  <201011201114.oAKBE6Bk009784@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Nov 20 11:14:06 2010
New Revision: 215555
URL: http://svn.freebsd.org/changeset/base/215555

Log:
  MFC r215248:
  In printfile(), exit the process instead of only printing the warning.
  Adjust style.

Modified:
  stable/8/sbin/kldstat/kldstat.c
Directory Properties:
  stable/8/sbin/kldstat/   (props changed)

Modified: stable/8/sbin/kldstat/kldstat.c
==============================================================================
--- stable/8/sbin/kldstat/kldstat.c	Sat Nov 20 10:12:20 2010	(r215554)
+++ stable/8/sbin/kldstat/kldstat.c	Sat Nov 20 11:14:06 2010	(r215555)
@@ -50,14 +50,15 @@ printmod(int modid)
 	printf("\t\t%2d %s\n", stat.id, stat.name);
 }
 
-static void printfile(int fileid, int verbose)
+static void
+printfile(int fileid, int verbose)
 {
     struct kld_file_stat stat;
     int modid;
 
     stat.version = sizeof(struct kld_file_stat);
     if (kldstat(fileid, &stat) < 0)
-	warn("can't stat file id %d", fileid);
+	err(1, "can't stat file id %d", fileid);
     else
 	printf("%2d %4d %p %-8zx %s",
 	       stat.id, stat.refs, stat.address, stat.size, 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011201114.oAKBE6Bk009784>