From 1b6a6c70bbdc80d8f5d2efdc08ce00d156360f30 Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Wed, 18 Jun 1997 06:28:46 +0000 Subject: [PATCH] Fprintf -> warn. --- sbin/restore/dirs.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index 0dfb6452cc18..f698e9353e59 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -34,6 +34,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $Id$ */ #ifndef lint @@ -55,6 +57,7 @@ static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95"; #include #include #include +#include #include @@ -155,10 +158,7 @@ extractdirs(genmode) if (fd == -1 || (df = fdopen(fd, "w")) == NULL) { if (fd != -1) close(fd); - fprintf(stderr, - "restore: %s - cannot create directory temporary\n", - dirfile); - fprintf(stderr, "fopen: %s\n", strerror(errno)); + warn("%s - cannot create directory temporary\nfopen", dirfile); done(1); } if (genmode != 0) { @@ -171,10 +171,7 @@ extractdirs(genmode) if (fd == -1 || (mf = fdopen(fd, "w")) == NULL) { if (fd != -1) close(fd); - fprintf(stderr, - "restore: %s - cannot create modefile \n", - modefile); - fprintf(stderr, "fopen: %s\n", strerror(errno)); + warn("%s - cannot create modefile\nfopen", modefile); done(1); } }