copystr(9): Move to deprecate (attempt #2)This reapplies logical r360944 and r360946 (reverting r360955), with fixedcopystr() stand-in replacement macro. Eventually the goal is to convertconsume
copystr(9): Move to deprecate (attempt #2)This reapplies logical r360944 and r360946 (reverting r360955), with fixedcopystr() stand-in replacement macro. Eventually the goal is to convertconsumers and kill the macro, but for a first step it helps if the macro iscorrect.Prior commit message:Unlike the other copy*() functions, it does not serve to copy from oneaddress space to another or protect against potential faults. It's justan older incarnation of the now-more-common strlcpy().Add a coccinelle script to tools/ which can be used to mechanicallyconvert existing instances where replacement with strlcpy is trivial.In the two cases which matched, fuse_vfsops.c and union_vfsops.c, thecode was further refactored manually to simplify.Replace the declaration of copystr() in systm.h with a small macrowrapper around strlcpy (with correction from brooks@ -- thanks).Remove N redundant MI implementations of copystr. For MIPS, thisentailed inlining the assembler copystr into the only consumer,copyinstr, and making the latter a leaf function.Reviewed by: jhb (earlier version)Discussed with: brooks (thanks!)Differential Revision: https://reviews.freebsd.org/D24672
show more ...
Revert r360944 and r360946 until reported issues can be resolvedReported by: cy
copystr(9): Move to deprecate [2/2]Unlike the other copy*() functions, it does not serve to copy from oneaddress space to another or protect against potential faults. It's justan older incarnati
copystr(9): Move to deprecate [2/2]Unlike the other copy*() functions, it does not serve to copy from oneaddress space to another or protect against potential faults. It's justan older incarnation of the now-more-common strlcpy().Add a coccinelle script to tools/ which can be used to mechanicallyconvert existing instances where replacement with strlcpy is trivial.In the two cases which matched, fuse_vfsops.c and union_vfsops.c, thecode was further refactored manually to simplify.Replace the declaration of copystr() in systm.h with a small macrowrapper around strlcpy.Remove N redundant MI implementations of copystr. For MIPS, thisentailed inlining the assembler copystr into the only consumer,copyinstr, and making the latter a leaf function.Reviewed by: jhbDifferential Revision: https://reviews.freebsd.org/D24672