]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Replace makefs' hand-rolled unescaping with strunvis
authorbenno <benno@FreeBSD.org>
Fri, 25 Aug 2017 16:10:16 +0000 (16:10 +0000)
committerbenno <benno@FreeBSD.org>
Fri, 25 Aug 2017 16:10:16 +0000 (16:10 +0000)
commit2ed87b40c3701fb7140d1a348eae4d4507408197
treee0c84c0cddc57c8d2fc09601b4bdb7aca35d654e
parenta78f415b2a15d31eb4c280a2acffd51cd8d3cec6
Replace makefs' hand-rolled unescaping with strunvis

mtree path names and link attributes are encoded, generally using strvis. Newer
versions of mtree will use C-style escapes but previously the accepted form was
octal escapes. makefs' mtree code spots the C-style escapes but fails to deal
with octal escapes correctly.

Remove mtree's escape-decoding code (except for a few instances where it's
needed) and instead pass pathnames and link targets through strunvis prior to
use.

Reviewed by: marcel
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12104
usr.sbin/makefs/mtree.c