diff --git a/src/lib/libutil/opendev.3 b/src/lib/libutil/opendev.3 index f6266b01..08b06138 100644 --- a/src/lib/libutil/opendev.3 +++ b/src/lib/libutil/opendev.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: opendev.3,v 1.18 2010/04/01 17:06:55 jmc Exp $ +.\" $OpenBSD: opendev.3,v 1.19 2010/12/17 19:35:34 millert Exp $ .\" .\" Copyright (c) 2000, Todd C. Miller. All rights reserved. .\" Copyright (c) 1996, Jason Downs. All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: April 1 2010 $ +.Dd $Mdocdate: December 17 2010 $ .Dt OPENDEV 3 .Os .Sh NAME @@ -33,7 +33,7 @@ .Sh SYNOPSIS .Fd #include .Ft int -.Fn opendev "char *path" "int oflags" "int dflags" "char **realpath" +.Fn opendev "const char *path" "int oflags" "int dflags" "char **realpath" .Sh DESCRIPTION The .Fn opendev diff --git a/src/lib/libutil/opendev.c b/src/lib/libutil/opendev.c index 5856cbd2..b43cb819 100644 --- a/src/lib/libutil/opendev.c +++ b/src/lib/libutil/opendev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opendev.c,v 1.11 2010/11/15 15:07:40 jsing Exp $ */ +/* $OpenBSD: opendev.c,v 1.12 2010/12/17 19:35:34 millert Exp $ */ /* * Copyright (c) 2000, Todd C. Miller. All rights reserved. @@ -46,7 +46,7 @@ * disklabel(8). */ int -opendev(char *path, int oflags, int dflags, char **realpath) +opendev(const char *path, int oflags, int dflags, char **realpath) { static char namebuf[PATH_MAX]; struct dk_diskmap dm; @@ -55,7 +55,7 @@ opendev(char *path, int oflags, int dflags, char **realpath) /* Initial state */ if (realpath) - *realpath = path; + *realpath = (char *)path; fd = -1; errno = ENOENT; diff --git a/src/lib/libutil/util.h b/src/lib/libutil/util.h index c0b5bb68..35bc6be9 100644 --- a/src/lib/libutil/util.h +++ b/src/lib/libutil/util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: util.h,v 1.28 2010/11/15 15:07:40 jsing Exp $ */ +/* $OpenBSD: util.h,v 1.29 2010/12/17 19:35:34 millert Exp $ */ /* $NetBSD: util.h,v 1.2 1996/05/16 07:00:22 thorpej Exp $ */ /*- @@ -86,7 +86,7 @@ void login(struct utmp *); int login_tty(int); int logout(const char *); void logwtmp(const char *, const char *, const char *); -int opendev(char *, int, int, char **); +int opendev(const char *, int, int, char **); int pidfile(const char *); void pw_setdir(const char *); char *pw_file(const char *);