mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-06-02 04:56:43 +00:00
fix: Throw object for XMLHttpRequest (#1166)
This commit is contained in:
@@ -264,12 +264,12 @@ convertDisk() {
|
||||
local FS="$7"
|
||||
|
||||
[ -f "$DST_FILE" ] && error "Conversion failed, destination file $DST_FILE already exists?" && exit 79
|
||||
[ ! -f "$SOURCE_FILE" ] && error "Conversion failed, source file $SOURCE_FILE does not exists?" && exit 79
|
||||
[ ! -f "$SOURCE_FILE" ] && error "Conversion failed, source file $SOURCE_FILE does not exist?" && exit 79
|
||||
|
||||
local TMP_FILE="$DISK_BASE.tmp"
|
||||
rm -f "$TMP_FILE"
|
||||
|
||||
local DIR
|
||||
local DIR FA
|
||||
DIR=$(dirname "$TMP_FILE")
|
||||
|
||||
if [[ "$ALLOCATE" != [Nn]* ]]; then
|
||||
@@ -677,7 +677,10 @@ else
|
||||
addDisk "$DISK4_FILE" "$DISK_TYPE" "disk4" "$DISK4_SIZE" "6" "0xf" "$DISK_FMT" "$DISK_IO" "$DISK_CACHE" || exit $?
|
||||
fi
|
||||
|
||||
DISK_OPTS+=" -object iothread,id=io2"
|
||||
case "${DISK_TYPE,,}" in
|
||||
"blk" | "scsi" | "virtio-blk" | "virtio-scsi" )
|
||||
DISK_OPTS+=" -object iothread,id=io2" ;;
|
||||
esac
|
||||
|
||||
html "Initialized disks successfully..."
|
||||
return 0
|
||||
|
||||
@@ -14,7 +14,7 @@ function getInfo() {
|
||||
if (window.XMLHttpRequest) {
|
||||
request = new XMLHttpRequest();
|
||||
} else {
|
||||
throw "XMLHttpRequest not available!";
|
||||
throw new Error("XMLHttpRequest not available!");
|
||||
}
|
||||
|
||||
request.onreadystatechange = processInfo;
|
||||
|
||||
Reference in New Issue
Block a user