-sub pci_cleanup_mdev_device {
- my ($pciid, $uuid) = @_;
-
- $pciid = "0000:$pciid" if $pciid !~ m/^[0-9a-f]{4}:/;
-
- my $basedir = "$pcisysfs/devices/$pciid/$uuid";
-
- if (! -e $basedir) {
- return 1; # no cleanup necessary if it does not exist
- }
-
- return file_write("$basedir/remove", "1");
-}
-