Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Even though msdosfs never truncates file names it advertises...
details: https://anonhg.NetBSD.org/src/rev/607aff913e44
branches: trunk
changeset: 767501:607aff913e44
user: hannken <hannken%NetBSD.org@localhost>
date: Wed Jul 20 11:52:00 2011 +0000
description:
Even though msdosfs never truncates file names it advertises _PC_NO_TRUNC
as zero. Make it advertise one (no_trunc == true).
Names longer than NAME_MAX (255) will never pass namei() btw.
Fixes PR #43670 (msdosfs claims support for filenames longer than {NAME_MAX},
but fails)
diffstat:
sys/fs/msdosfs/msdosfs_vnops.c | 6 +++---
tests/fs/vfs/t_vnops.c | 6 +-----
2 files changed, 4 insertions(+), 8 deletions(-)
diffs (54 lines):
diff -r 22fb775584d6 -r 607aff913e44 sys/fs/msdosfs/msdosfs_vnops.c
--- a/sys/fs/msdosfs/msdosfs_vnops.c Wed Jul 20 10:39:43 2011 +0000
+++ b/sys/fs/msdosfs/msdosfs_vnops.c Wed Jul 20 11:52:00 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.77 2011/06/16 09:21:02 hannken Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.78 2011/07/20 11:52:00 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.77 2011/06/16 09:21:02 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.78 2011/07/20 11:52:00 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1771,7 +1771,7 @@
*ap->a_retval = 1;
return (0);
case _PC_NO_TRUNC:
- *ap->a_retval = 0;
+ *ap->a_retval = 1;
return (0);
case _PC_SYNC_IO:
*ap->a_retval = 1;
diff -r 22fb775584d6 -r 607aff913e44 tests/fs/vfs/t_vnops.c
--- a/tests/fs/vfs/t_vnops.c Wed Jul 20 10:39:43 2011 +0000
+++ b/tests/fs/vfs/t_vnops.c Wed Jul 20 11:52:00 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vnops.c,v 1.24 2011/05/30 13:10:38 martin Exp $ */
+/* $NetBSD: t_vnops.c,v 1.25 2011/07/20 11:52:00 hannken Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -439,8 +439,6 @@
if (val == -1)
atf_tc_fail_errno("pathconf");
- if (FSTYPE_MSDOS(tc))
- atf_tc_expect_fail("PR kern/43670");
fd = rump_sys_open(name, O_RDWR|O_CREAT, 0666);
if (val != 0 && (fd != -1 || errno != ENAMETOOLONG))
atf_tc_fail_errno("open");
@@ -511,8 +509,6 @@
if (val == -1)
atf_tc_fail_errno("pathconf");
- if (FSTYPE_MSDOS(tc))
- atf_tc_expect_fail("PR kern/43670");
res = rump_sys_rename("dummy", name);
if (val != 0 && (res != -1 || errno != ENAMETOOLONG))
atf_tc_fail_errno("rename");
Home |
Main Index |
Thread Index |
Old Index