]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libvirt_recover_xattrs: Use only the correct xattr prefix
authorPeter Krempa <pkrempa@redhat.com>
Wed, 2 Dec 2020 09:24:21 +0000 (10:24 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 4 Dec 2020 15:27:22 +0000 (16:27 +0100)
commit5377177f80da40ee7d47601400b50835f093715a
tree9f0260139e7e01b6163b1c728596bc2910031a27
parent7b6bc11f650b31081d0fb34027e915e7bb70c2c5
libvirt_recover_xattrs: Use only the correct xattr prefix

Linux and FreeBSD have different prefix. In the current state we've
tried to reset the labels for both systems which resulted in errors like
this:

Fixing /tmp/bitmaps2.qcow2
setfattr: /tmp/bitmaps2.qcow2: Operation not supported
setfattr: /tmp/bitmaps2.qcow2: Operation not supported
setfattr: /tmp/bitmaps2.qcow2: Operation not supported
setfattr: /tmp/bitmaps2.qcow2: Operation not supported
setfattr: /tmp/bitmaps2.qcow2: Operation not supported
setfattr: /tmp/bitmaps2.qcow2: Operation not supported

The 6 failed 'setfattrs' correspond to the wrong prefix.

Select the correct prefix based on the kernel name and modify the code
appropriately.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tools/libvirt_recover_xattrs.sh