summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-06-06 22:43:38 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-06-07 22:20:53 +0200
commitcc05f407bcf77bc5a5c74c5e237d5a5aa5194bba (patch)
tree5d19c48bff7ce512dbcc0009702ad48fb23e70fb /fs
parent77f4c205b9c2b6346b479c6ed29ead74fe9637cf (diff)
core/pkg-utils: add macro to escape-and-printf
In some cases we need to escape make variables and pass them to printf(1). This is the case in our fs infra, where we want to shoe-horn the commands to generate the filesystems in the fakeroot script, or the devices, permissions and users tables to their respective files. We currently do so by replacing $(sep) with the literal '\n' but that's not enough. This does not protect against strings with an embedded '%' or a backslash. Add a new macro that properly escapes a string and calls printf(1), so that we get the expected output. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions