mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:29:24 +02:00
+ Initial import
This commit is contained in:
parent
6731abb0db
commit
d39ef1a6a0
1560
packages/extra/os2units/lvm/Makefile
Normal file
1560
packages/extra/os2units/lvm/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
19
packages/extra/os2units/lvm/Makefile.fpc
Normal file
19
packages/extra/os2units/lvm/Makefile.fpc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# Makefile.fpc for the Multimedia Toolkit (interface units for MMPM)
|
||||||
|
#
|
||||||
|
|
||||||
|
[package]
|
||||||
|
name=lvm
|
||||||
|
version=1.0.8
|
||||||
|
|
||||||
|
[target]
|
||||||
|
units=lvm
|
||||||
|
|
||||||
|
exampledirs=tests
|
||||||
|
|
||||||
|
[install]
|
||||||
|
fpcpackage=y
|
||||||
|
|
||||||
|
[default]
|
||||||
|
fpcdir=../../../..
|
||||||
|
|
5246
packages/extra/os2units/lvm/lvm.pas
Normal file
5246
packages/extra/os2units/lvm/lvm.pas
Normal file
File diff suppressed because it is too large
Load Diff
1422
packages/extra/os2units/lvm/tests/Makefile
Normal file
1422
packages/extra/os2units/lvm/tests/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
12
packages/extra/os2units/lvm/tests/Makefile.fpc
Normal file
12
packages/extra/os2units/lvm/tests/Makefile.fpc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Makefile.fpc for MMTK sample programs
|
||||||
|
#
|
||||||
|
|
||||||
|
[target]
|
||||||
|
programs=lvmtest
|
||||||
|
|
||||||
|
[install]
|
||||||
|
fpcpackage=y
|
||||||
|
|
||||||
|
[default]
|
||||||
|
fpcdir=../../../../..
|
75
packages/extra/os2units/lvm/tests/lvmtest.pas
Normal file
75
packages/extra/os2units/lvm/tests/lvmtest.pas
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
(*****************************************************************************
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||||
|
* the GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*****************************************************************************)
|
||||||
|
uses lvm;
|
||||||
|
|
||||||
|
// lvmtest.cpp, program to test the LVM library
|
||||||
|
//
|
||||||
|
// By John Martin Alfredsson, jma@jmast.se
|
||||||
|
// Pascal conversion by Yuri Prokushev
|
||||||
|
|
||||||
|
var
|
||||||
|
vca: Volume_Control_Array;
|
||||||
|
vir: Volume_Information_Record;
|
||||||
|
iCounter: integer;
|
||||||
|
const
|
||||||
|
Error_Code: CARDINAL32 = 99999;
|
||||||
|
begin
|
||||||
|
Open_LVM_Engine(True, addr(Error_Code));
|
||||||
|
if Error_Code<>0 then
|
||||||
|
begin
|
||||||
|
writeln('Open_LVM_Engine Error !!');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
vca:=Get_Volume_Control_Data(addr(Error_Code));
|
||||||
|
if Error_Code<>0 then
|
||||||
|
begin
|
||||||
|
writeln('Get_Volume_Control_Data Error !!');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
for iCounter:=0 to vca.Count-1 do
|
||||||
|
begin
|
||||||
|
writeln('--------------------------------------');
|
||||||
|
vir:=Get_Volume_Information(vca.Volume_Control_Data[iCounter].Volume_Handle, addr(Error_Code));
|
||||||
|
writeln('Volname : [', vir.Current_Drive_Letter, ':] ', vir.Volume_Name);
|
||||||
|
writeln('FileSystem : ', vir.File_System_Name);
|
||||||
|
case vir.Status of
|
||||||
|
0: writeln('Status : None');
|
||||||
|
1: writeln('Status : Bootable');
|
||||||
|
2: writeln('Status : Startable');
|
||||||
|
3: writeln('Status : Installable');
|
||||||
|
end;
|
||||||
|
|
||||||
|
if vca.Volume_Control_Data[iCounter].Compatibility_Volume then
|
||||||
|
writeln('Volume type : Compatibility Volume')
|
||||||
|
else
|
||||||
|
writeln('Volume type : LVM Volume');
|
||||||
|
end;
|
||||||
|
|
||||||
|
writeln('--------------------------------------');
|
||||||
|
|
||||||
|
Free_Engine_Memory(vca.Volume_Control_Data);
|
||||||
|
Close_LVM_Engine;
|
||||||
|
end.
|
||||||
|
|
||||||
|
{
|
||||||
|
$Log$
|
||||||
|
Revision 1.1 2003-08-11 07:25:09 yuri
|
||||||
|
+ Initial import
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user