mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
For Device parameters we expect a block device name. However we were only testing for "/dev/..." and so chardevs (from the appliance) could be passed here, resulting in strange effects. This adds a function is_device_parameter which tests for a valid block device name. For Dev_or_Path parameters much the same, except we can also use the is_device_parameter function elsewhere in the daemon to distinguish if we were called with a device or path parameter. Previously we used a simple test if the path begins with "/dev/...". Reported by Mathieu Tarral.
3.8 KiB
3.8 KiB