summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/sys/swapctl.22
-rw-r--r--sbin/swapctl/swapctl.c6
-rw-r--r--sys/sys/swap.h4
-rw-r--r--sys/uvm/uvm_swap.c4
-rw-r--r--sys/vm/vm_swap.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc/sys/swapctl.2 b/lib/libc/sys/swapctl.2
index 1c4f1dc29af..43f915834c0 100644
--- a/lib/libc/sys/swapctl.2
+++ b/lib/libc/sys/swapctl.2
@@ -94,7 +94,7 @@ struct swapent {
int se_nblks; /* total blocks */
int se_inuse; /* blocks in use */
int se_priority; /* priority */
- char se_path[PATH_MAX+1]; /* path to entry */
+ char se_path[MAXPATHLEN]; /* path to entry */
};
.Ed
.Pp
diff --git a/sbin/swapctl/swapctl.c b/sbin/swapctl/swapctl.c
index 78148c25006..56d01215381 100644
--- a/sbin/swapctl/swapctl.c
+++ b/sbin/swapctl/swapctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swapctl.c,v 1.3 2000/06/30 16:00:09 millert Exp $ */
+/* $OpenBSD: swapctl.c,v 1.4 2001/03/09 03:13:48 deraadt Exp $ */
/* $NetBSD: swapctl.c,v 1.9 1998/07/26 20:23:15 mycroft Exp $ */
/*
@@ -370,7 +370,7 @@ do_fstab()
priority = pri;
if ((s = strstr(fp->fs_mntops, NFSMNTPT)) != NULL) {
- char *t, cmd[2*PATH_MAX+sizeof(PATH_MOUNT)+2];
+ char *t, cmd[strlen(PATH_MOUNT)+1+PATH_MAX+1+PATH_MAX+1];
/*
* Skip this song and dance if we're only
@@ -396,7 +396,7 @@ do_fstab()
continue;
}
snprintf(cmd, sizeof(cmd), "%s %s %s",
- PATH_MOUNT, fp->fs_spec, spec);
+ PATH_MOUNT, fp->fs_spec, spec);
if (system(cmd) != 0) {
warnx("%s: mount failed", fp->fs_spec);
continue;
diff --git a/sys/sys/swap.h b/sys/sys/swap.h
index dc9d0fbc8d9..b121668d6e0 100644
--- a/sys/sys/swap.h
+++ b/sys/sys/swap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: swap.h,v 1.2 1999/08/23 17:08:37 art Exp $ */
+/* $OpenBSD: swap.h,v 1.3 2001/03/09 03:13:47 deraadt Exp $ */
/* $NetBSD: swap.h,v 1.2 1998/09/13 14:46:24 christos Exp $ */
/*
@@ -49,7 +49,7 @@ struct swapent {
int se_nblks; /* total blocks */
int se_inuse; /* blocks in use */
int se_priority; /* priority of this device */
- char se_path[PATH_MAX+1]; /* path name */
+ char se_path[MAXPATHLEN]; /* path name */
};
#define SWAP_ON 1 /* begin swapping on device */
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c
index 6bdfd72b91f..0a2694f40f0 100644
--- a/sys/uvm/uvm_swap.c
+++ b/sys/uvm/uvm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap.c,v 1.24 2001/03/08 15:21:37 smart Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.25 2001/03/09 03:13:47 deraadt Exp $ */
/* $NetBSD: uvm_swap.c,v 1.28 1999/07/22 22:58:39 thorpej Exp $ */
/*
@@ -678,7 +678,7 @@ sys_swapctl(p, v, retval)
struct swappri *spp;
struct swapdev *sdp;
struct swapent *sep;
- char userpath[PATH_MAX + 1];
+ char userpath[MAXPATHLEN];
size_t len;
int count, error, misc;
int priority;
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c
index da769c91d9a..68e2e0f5fd2 100644
--- a/sys/vm/vm_swap.c
+++ b/sys/vm/vm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_swap.c,v 1.14 2001/03/01 21:38:35 csapuntz Exp $ */
+/* $OpenBSD: vm_swap.c,v 1.15 2001/03/09 03:13:48 deraadt Exp $ */
/* $NetBSD: vm_swap.c,v 1.64 1998/11/08 19:45:17 mycroft Exp $ */
/*
@@ -335,7 +335,7 @@ sys_swapctl(p, v, retval)
struct swappri *spp;
struct swapdev *sdp;
struct swapent *sep;
- char userpath[PATH_MAX + 1];
+ char userpath[MAXPATHLEN];
int count, error, misc;
size_t len;
int priority;