freebsd-src/tools/coccinelle
Kyle Evans a2f08d0ddc pseudofs: return errors from pfs_create_*()
In D52038, we kind of guess at the reason that pfs_create_dir() failed,
which isn't great: it could be EEXISTS, or it could even be ENOMEM.

Change the pfs_create_*() interfaces to return an error and use a double
pointer to return the new node as requested.  Outside of the changes
in sys/fs/pseudofs, this diff is the result of running the added
coccinelle script against in-tree pseudofs and fixing all of the
style(9) violations that spatch added.

We set *opn to NULL in the failure cases to avoid breaking callers that
did actually error-check their results, since the cocci patch does not
attempt to handle that in any way.

Reviewed by:	des (previous version), kib
Differential Revision:	https://reviews.freebsd.org/D52157
2025-09-03 21:08:52 -05:00
..
copystr9.cocci
pseudofs-create.cocci pseudofs: return errors from pfs_create_*() 2025-09-03 21:08:52 -05:00