common.rc (d1bf88e56f46c75d472dc60c02bbbc7b474519f9) common.rc (21b43d004813ae71d964f74e59ff149bb480db73)
1#!/usr/bin/env bash
2#
3# Copyright (C) 2009 Red Hat, Inc.
4# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or

--- 506 unchanged lines hidden (view full) ---

515 elif [ "$1" = "QEMU_NBD" ]; then
516 c=$QEMU_NBD_PROG
517 else
518 eval c=\$$1
519 fi
520 [ -x "$c" ] || _notrun "$1 utility required, skipped this test"
521}
522
1#!/usr/bin/env bash
2#
3# Copyright (C) 2009 Red Hat, Inc.
4# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or

--- 506 unchanged lines hidden (view full) ---

515 elif [ "$1" = "QEMU_NBD" ]; then
516 c=$QEMU_NBD_PROG
517 else
518 eval c=\$$1
519 fi
520 [ -x "$c" ] || _notrun "$1 utility required, skipped this test"
521}
522
523# Check that a set of drivers has been whitelisted in the QEMU binary
524#
525_require_drivers()
526{
527 available=$($QEMU -drive format=help | \
528 sed -e '/Supported formats:/!d' -e 's/Supported formats://')
529 for driver
530 do
531 if ! echo "$available" | grep -q " $driver\( \|$\)"; then
532 _notrun "$driver not available"
533 fi
534 done
535}
536
523# make sure this script returns success
524true
537# make sure this script returns success
538true