From df1b0a5d93b83bf318a7669ab80f477a8a8c9eb6 Mon Sep 17 00:00:00 2001 From: Jason Downs Date: Mon, 17 Jun 1996 08:27:27 +0000 Subject: Switched to generic opendev(3) --- sbin/fdisk/fdisk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sbin/fdisk/fdisk.c') diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index ce378a35eab..46e7b44bec7 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -1,3 +1,4 @@ +/* $OpenBSD */ /* $NetBSD: fdisk.c,v 1.11 1995/10/04 23:11:19 ghudson Exp $ */ /* @@ -42,6 +43,7 @@ static char rcsid[] = "$NetBSD: fdisk.c,v 1.11 1995/10/04 23:11:19 ghudson Exp $ #include #include #include +#include #define LBUF 100 static char lbuf[LBUF]; @@ -595,7 +597,8 @@ open_disk(u_flag) { struct stat st; - if ((fd = open(disk, u_flag ? O_RDWR : O_RDONLY)) == -1) { + fd = opendev(disk, (u_flag ? O_RDWR : O_RDONLY), OPENDEV_PART, &disk); + if (fd == -1) { warn("%s", disk); return (-1); } -- cgit v1.2.3