893593272f
Use the same build tags for bin2img and copyimg that we use for ocid, and improve detection of the case where we need to use the "libdm_no_deferred_remove" tag. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
15 lines
332 B
Bash
Executable file
15 lines
332 B
Bash
Executable file
#!/bin/bash
|
|
tmpdir="$PWD/tmp.$RANDOM"
|
|
mkdir -p "$tmpdir"
|
|
trap 'rm -fr "$tmpdir"' EXIT
|
|
cc -o "$tmpdir"/libdm_tag -ldevmapper -x c - > /dev/null 2> /dev/null << EOF
|
|
#include <libdevmapper.h>
|
|
int main() {
|
|
struct dm_task *task;
|
|
dm_task_deferred_remove(task);
|
|
return 0;
|
|
}
|
|
EOF
|
|
if test $? -ne 0 ; then
|
|
echo libdm_no_deferred_remove
|
|
fi
|