parted: support virtio block

This commit is contained in:
Matheus
2025-11-12 20:03:38 -03:00
parent 462eb91e0d
commit 8700cf9e41
+5 -2
View File
@@ -12,10 +12,10 @@ index 7b7b1fd..7f6404f 100755
diff --git parted-workdir/libparted/arch/astral.c parted-workdir/libparted/arch/astral.c diff --git parted-workdir/libparted/arch/astral.c parted-workdir/libparted/arch/astral.c
new file mode 100644 new file mode 100644
index 0000000..2989679 index 0000000..4fda5e7
--- /dev/null --- /dev/null
+++ parted-workdir/libparted/arch/astral.c +++ parted-workdir/libparted/arch/astral.c
@@ -0,0 +1,558 @@ @@ -0,0 +1,561 @@
+/* +/*
+ libparted - a library for manipulating disk partitions + libparted - a library for manipulating disk partitions
+ Copyright (C) 2006-2007, 2009-2014, 2019-2023 Free Software Foundation, + Copyright (C) 2006-2007, 2009-2014, 2019-2023 Free Software Foundation,
@@ -142,6 +142,9 @@ index 0000000..2989679
+ if (dev->path && strstr(dev->path, "nvme")) + if (dev->path && strstr(dev->path, "nvme"))
+ return PED_DEVICE_NVME; + return PED_DEVICE_NVME;
+ +
+ if (dev->path && strstr(dev->path, "vioblk"))
+ return PED_DEVICE_VIRTBLK;
+
+ return PED_DEVICE_UNKNOWN; + return PED_DEVICE_UNKNOWN;
+error: +error:
+ close(fd); + close(fd);