Global: overall optimization

This commit is contained in:
李通洲
2024-10-25 14:48:11 +08:00
parent 6dc6fd8b24
commit fd26373c8f
21 changed files with 126 additions and 131 deletions
+2 -2
View File
@@ -176,7 +176,7 @@ static bool isSubvolume(const FFlist* disks, FFDisk* currentDisk)
FF_STRBUF_AUTO_DESTROY zpoolName = ffStrbufCreateNS(index, currentDisk->mountFrom.chars);
for(uint32_t i = 0; i < disks->length - 1; i++)
{
const FFDisk* otherDevice = ffListGet(disks, i);
const FFDisk* otherDevice = FF_LIST_GET(FFDisk, *disks, i);
if(ffStrbufEqualS(&otherDevice->filesystem, "zfs") && ffStrbufStartsWith(&otherDevice->mountFrom, &zpoolName))
return true;
}
@@ -188,7 +188,7 @@ static bool isSubvolume(const FFlist* disks, FFDisk* currentDisk)
//Filter all disks which device was already found. This catches BTRFS subvolumes.
for(uint32_t i = 0; i < disks->length - 1; i++)
{
const FFDisk* otherDevice = ffListGet(disks, i);
const FFDisk* otherDevice = FF_LIST_GET(FFDisk, *disks, i);
if(ffStrbufEqual(&currentDisk->mountFrom, &otherDevice->mountFrom))
return true;