Author: johalun
Date: Tue Jun 4 01:00:30 2019
New Revision: 348597
URL: https://svnweb.freebsd.org/changeset/base/348597
Log:
MFC r348338:
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
Differential Revision: D20451
Modified:
stable/12/sys/fs/pseudofs/pseudofs_vnops.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- stable/12/sys/fs/pseudofs/pseudofs_vnops.c Tue Jun 4 00:42:51 2019
(r348596)
+++ stable/12/sys/fs/pseudofs/pseudofs_vnops.c Tue Jun 4 01:00:30 2019
(r348597)
@@ -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);
}
/*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"