From af8f3b2175c52f9d3bdf290827283bcb086ea54e Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 25 Dec 2002 12:08:37 +0000 Subject: [PATCH] Doesn't try to get a FS info for non-data partitions anymore. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2295 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../add-ons/kernel/disk_scanner/DiskScannerTest.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/tests/add-ons/kernel/disk_scanner/DiskScannerTest.cpp b/src/tests/add-ons/kernel/disk_scanner/DiskScannerTest.cpp index 37fa98f8ae..6c47621bcb 100644 --- a/src/tests/add-ons/kernel/disk_scanner/DiskScannerTest.cpp +++ b/src/tests/add-ons/kernel/disk_scanner/DiskScannerTest.cpp @@ -83,9 +83,14 @@ partitionInfo->info.device[0] = '\0'; } // get the FS info if (error == B_OK) { - error = disk_scanner->get_partition_fs_info(deviceFD, partitionInfo); - // in case the FS is unknown, we fill in the respective fields - if (error == B_ENTRY_NOT_FOUND) { + bool hidden = (partitionInfo->flags & B_HIDDEN_PARTITION); + if (!hidden) { + error = disk_scanner->get_partition_fs_info(deviceFD, + partitionInfo); + } + // in case the partition is no data partition or the FS is unknown, + // we fill in the respective fields + if (hidden || error == B_ENTRY_NOT_FOUND) { error = B_OK; partitionInfo->file_system_short_name[0] = '\0'; partitionInfo->file_system_long_name[0] = '\0';