summaryrefslogtreecommitdiff
path: root/sys/msdosfs/denode.h
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2005-03-01 14:24:34 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2005-03-01 14:24:34 +0000
commite177759a416ea6ef09860382e66d9a3afc94a7fe (patch)
tree8892a63a25752b48fbc1612e09876ab2fff64c3b /sys/msdosfs/denode.h
parentea6860c8fa6e53eac4959352c39b2a1447bbbab6 (diff)
The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this. Just return EFBIG to caller, rather than panic()ing later. Closes PR 4090. Assistance from otto@, tested by OP and moritz@; thanks. ok tedu@ deraadt@
Diffstat (limited to 'sys/msdosfs/denode.h')
-rw-r--r--sys/msdosfs/denode.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/msdosfs/denode.h b/sys/msdosfs/denode.h
index 14b7ccbab0d..827433ac702 100644
--- a/sys/msdosfs/denode.h
+++ b/sys/msdosfs/denode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: denode.h,v 1.17 2004/05/14 04:05:05 tedu Exp $ */
+/* $OpenBSD: denode.h,v 1.18 2005/03/01 14:24:33 tom Exp $ */
/* $NetBSD: denode.h,v 1.24 1997/10/17 11:23:39 ws Exp $ */
/*-
@@ -178,6 +178,9 @@ struct denode {
*/
#define WIN_MAXLEN 255
+/* Maximum size of a file on a FAT filesystem */
+#define MSDOSFS_FILESIZE_MAX 0xFFFFFFFFLL
+
/*
* Transfer directory entries between internal and external form.
* dep is a struct denode * (internal form),