From a6cc39e45a4464a037f82743e5b6a74a0df64036 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 6 Oct 2008 12:36:24 +0200 Subject: Skip '0' and NULL mount points --- UCore.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'UCore.pas') diff --git a/UCore.pas b/UCore.pas index 374045f..b2ac837 100644 --- a/UCore.pas +++ b/UCore.pas @@ -2386,11 +2386,12 @@ begin // Get mount name mntent := getmntent(fd); while mntent <> nil do begin - DebugMsg(['FillDefaultFstabMounterItems: found "', mntent^.mnt_dir, '" --> "', mntent^.mnt_fsname, '", fstype ', mntent^.mnt_type]); - if (mntent^.mnt_dir <> '/') and (mntent^.mnt_dir <> '/boot') and (Pos('/proc', mntent^.mnt_dir) <> 1) and + DebugMsg(['FillDefaultFstabMounterItems: found "', mntent^.mnt_dir, '" --> "', mntent^.mnt_fsname, '", fstype "', mntent^.mnt_type, '"']); + if (mntent^.mnt_dir <> nil) and (mntent^.mnt_type <> nil) and (strlen(mntent^.mnt_dir) > 0) and (strlen(mntent^.mnt_type) > 0) and + (mntent^.mnt_dir <> '/') and (mntent^.mnt_dir <> '/boot') and (Pos('/proc', mntent^.mnt_dir) <> 1) and (Pos('/dev', mntent^.mnt_dir) <> 1) and (Pos('/sys', mntent^.mnt_dir) <> 1) and (mntent^.mnt_dir <> 'swap') and (mntent^.mnt_type <> 'swap') and (mntent^.mnt_type <> 'rpc_pipefs') and (mntent^.mnt_type <> 'none') and - (mntent^.mnt_dir <> 'none') and (mntent^.mnt_dir <> '') then + (mntent^.mnt_dir <> 'none') then begin MounterItem := TMounterItem.Create; MounterItem.DisplayText := ''; -- cgit v1.2.3