summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_nfs/mount_nfs.c5
-rw-r--r--sbin/newfs_ext2fs/newfs_ext2fs.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 33c0c692373..74a10d6359d 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_nfs.c,v 1.50 2012/05/29 20:04:59 jasper Exp $ */
+/* $OpenBSD: mount_nfs.c,v 1.51 2014/05/21 06:23:01 guenther Exp $ */
/* $NetBSD: mount_nfs.c,v 1.12.4.1 1996/05/25 22:48:05 fvdl Exp $ */
/*
@@ -505,8 +505,7 @@ tryagain:
if (nfhret.stat) {
if (opflags & ISBGRND)
exit(1);
- errno = nfhret.stat;
- warnx("can't access %s: %s", spec, strerror(nfhret.stat));
+ warnc(nfhret.stat, "can't access %s", spec);
return (0);
}
saddr.sin_port = htons(tport);
diff --git a/sbin/newfs_ext2fs/newfs_ext2fs.c b/sbin/newfs_ext2fs/newfs_ext2fs.c
index ba3e8e307f1..55e2eb5945e 100644
--- a/sbin/newfs_ext2fs/newfs_ext2fs.c
+++ b/sbin/newfs_ext2fs/newfs_ext2fs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs_ext2fs.c,v 1.11 2014/04/22 00:23:35 guenther Exp $ */
+/* $OpenBSD: newfs_ext2fs.c,v 1.12 2014/05/21 06:23:01 guenther Exp $ */
/* $NetBSD: newfs_ext2fs.c,v 1.8 2009/03/02 10:38:13 tsutsui Exp $ */
/*
@@ -511,7 +511,7 @@ getpartition(int fsi, const char *special, char *argv[], struct disklabel **dl)
struct partition *pp;
if (fstat(fsi, &st) < 0)
- errx(EXIT_FAILURE, "%s: %s", special, strerror(errno));
+ err(EXIT_FAILURE, "%s", special);
if (S_ISBLK(st.st_mode))
errx(EXIT_FAILURE, "%s: block device", special);
if (!S_ISCHR(st.st_mode))