summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-12-01 06:29:13 +0000
committerkrw <krw@openbsd.org>2015-12-01 06:29:13 +0000
commit31eae13b1079bc9aa7e5c59c231a6e5f3557de62 (patch)
tree031978a7ca871a4289a1bea7a16f30c37b83a9e5
parentMake '-i' set 'reinited' flag so that the initial Xwrite() will zap (diff)
downloadwireguard-openbsd-31eae13b1079bc9aa7e5c59c231a6e5f3557de62.tar.xz
wireguard-openbsd-31eae13b1079bc9aa7e5c59c231a6e5f3557de62.zip
Fix inexplicable use of 'disk' instead of 'disk.name' when trying to
print the disk's name in an error message.
-rw-r--r--sbin/fdisk/disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fdisk/disk.c b/sbin/fdisk/disk.c
index 023af31a8ce..d5aba373d5b 100644
--- a/sbin/fdisk/disk.c
+++ b/sbin/fdisk/disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disk.c,v 1.52 2015/11/19 16:14:08 krw Exp $ */
+/* $OpenBSD: disk.c,v 1.53 2015/12/01 06:29:13 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -50,7 +50,7 @@ DISK_open(void)
err(1, "%s", disk.name);
if (!S_ISCHR(st.st_mode) && !S_ISREG(st.st_mode))
errx(1, "%s is not a character device or a regular file",
- disk);
+ disk.name);
/* Get label geometry. */
if (ioctl(disk.fd, DIOCGPDINFO, &dl) == -1) {