Date: Tue, 4 Jun 2019 01:00:30 +0000 (UTC) From: Johannes Lundberg <johalun@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348597 - stable/12/sys/fs/pseudofs Message-ID: <201906040100.x5410Ub5076481@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906040100.x5410Ub5076481>