summaryrefslogtreecommitdiffstats
path: root/sbin/restore
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-06-18 06:28:46 +0000
committercharnier <charnier@FreeBSD.org>1997-06-18 06:28:46 +0000
commit2f83b582ea0364eb6407fcbbfebdc0cdb071d868 (patch)
tree4738541c4246d6596af774336bcb4f101c8eb071 /sbin/restore
parent59c6ef884a174454627ad4e474ed046c199c9d9a (diff)
downloadFreeBSD-src-2f83b582ea0364eb6407fcbbfebdc0cdb071d868.zip
FreeBSD-src-2f83b582ea0364eb6407fcbbfebdc0cdb071d868.tar.gz
Fprintf -> warn.
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/dirs.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index 0dfb645..f698e93 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 <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <err.h>
#include <machine/endian.h>
@@ -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);
}
}
OpenPOWER on IntegriCloud