[functional-tests] Improve error message in create-device

This commit is contained in:
Joe Thornber 2017-12-15 11:18:09 +00:00
parent ee40e4becf
commit 2614078188

View File

@ -200,9 +200,10 @@
(dynamic-wind
(lambda () #f)
(lambda ()
(if (zero? (create (current-dm-interface) name uuid major minor))
(let ((r (create (current-dm-interface) name uuid major minor)))
(if (zero? r)
(make-dm-device name (deref-u32 major) (deref-u32 minor))
(fail "create-device failed")))
(fail (fmt #f "create-device failed with error code " r)))))
(lambda ()
(free-u32 major)
(free-u32 minor)))))