Browse Source

Use getrawpartition().

OPENBSD_2_0
downsj 28 years ago
parent
commit
a71e9c181d
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/lib/libutil/opendev.c

+ 3
- 3
src/lib/libutil/opendev.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: opendev.c,v 1.3 1996/06/20 10:46:02 deraadt Exp $ */
/* $OpenBSD: opendev.c,v 1.4 1996/07/02 07:57:54 downsj Exp $ */
/* /*
* Copyright (c) 1996, Jason Downs. All rights reserved. * Copyright (c) 1996, Jason Downs. All rights reserved.
@ -28,7 +28,6 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/disklabel.h>
#include <paths.h> #include <paths.h>
#include "util.h" #include "util.h"
@ -60,7 +59,8 @@ opendev(path, oflags, dflags, realpath)
* drives) * drives)
*/ */
(void)snprintf(namebuf, sizeof(namebuf), (void)snprintf(namebuf, sizeof(namebuf),
"%sr%s%c", _PATH_DEV, path, 'a' + RAW_PART);
"%sr%s%c", _PATH_DEV, path,
'a' + getrawpartition());
fd = open(namebuf, oflags); fd = open(namebuf, oflags);
} }


Loading…
Cancel
Save