summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-10 07:38:20 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-10 07:38:20 +0000
commit69f81d71876147808bc64f8ac209517fa3a2f57b (patch)
tree58860adc1658dd0fcbf2c6bd3b20f6b317f62ac7
parent095458d5966971344079484f99a2c08d1cfd598d (diff)
newfs does not need TMPDIR support
-rw-r--r--sbin/newfs/newfs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 846091d48f1..db050624b5e 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.100 2015/09/29 03:19:24 guenther Exp $ */
+/* $OpenBSD: newfs.c,v 1.101 2015/11/10 07:38:19 deraadt Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -792,15 +792,11 @@ copy(char *src, char *dst, struct mfs_args *args)
static int
gettmpmnt(char *mountpoint, size_t len)
{
- const char *tmp;
+ const char *tmp = _PATH_TMP;
const char *mnt = _PATH_MNT;
struct statfs fs;
size_t n;
- tmp = getenv("TMPDIR");
- if (tmp == NULL || *tmp == '\0')
- tmp = _PATH_TMP;
-
if (statfs(tmp, &fs) != 0)
err(1, "statfs %s", tmp);
if (fs.f_flags & MNT_RDONLY) {