svn commit: r348338 - head/sys/fs/pseudofs
Johannes Lundberg
johalun at FreeBSD.org
Tue May 28 20:55:00 UTC 2019
Author: johalun
Date: Tue May 28 20:54:59 2019
New Revision: 348338
URL: https://svnweb.freebsd.org/changeset/base/348338
Log:
pseudofs: Ignore unsupported commands in vop_setattr.
Users of pseudofs (e.g. lindebugfs), should be able to receive
input from command line via commands like "echo 1 > /path/to/file".
Currently this fails because sh tries to truncate the file first and
vop_setattr returns not supported error for this. This patch simply
ignores the error and returns 0 instead.
Reviewed by: imp (mentor), asomers
Approved by: imp (mentor), asomers
MFC after: 1 week
Differential Revision: D20451
Modified:
head/sys/fs/pseudofs/pseudofs_vnops.c
Modified: head/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- head/sys/fs/pseudofs/pseudofs_vnops.c Tue May 28 20:44:23 2019 (r348337)
+++ head/sys/fs/pseudofs/pseudofs_vnops.c Tue May 28 20:54:59 2019 (r348338)
@@ -967,7 +967,8 @@ pfs_setattr(struct vop_setattr_args *va)
PFS_TRACE(("%s", pn->pn_name));
pfs_assert_not_owned(pn);
- PFS_RETURN (EOPNOTSUPP);
+ /* Silently ignore unchangeable attributes. */
+ PFS_RETURN (0);
}
/*
More information about the svn-src-head
mailing list