mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
netboot: Improve error reporting in mk-s390image
If an input file is not readable return a proper error message indicating this. Before: $ mk-s390image /var/lib/libvirt/images/hades/vmlinux-s390x out.img mk-s390image: Unrecognized file format for /var/lib/libvirt/images/hades/vmlinux-s390x After: $ mk-s390image /var/lib/libvirt/images/hades/vmlinux-s390x out.img mk-s390image: File /var/lib/libvirt/images/hades/vmlinux-s390x cannot be read, no read permission Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
128e5f86fe
commit
419f042f55
@@ -123,6 +123,11 @@ dobuild()
|
||||
echo "$cmd: File $i not found" >&2
|
||||
return 1
|
||||
fi
|
||||
if [ ! -r "$i" ]
|
||||
then
|
||||
echo "$cmd: File $i cannot be read, no read permission" >&2
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
if ! file -b -- "$(readlink -f -- "$kernel")" | grep "Linux S390" > /dev/null
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user