Device-Blkid-E2fsprogs version 0.10 =================================== NOTE: This library only exposes the older e2fsprogs versions of libblkid ( numbered 1.xx.xx) and not the newer and preferred util-linux-ng versions ( v2.15 or better ). In almost every case you would be advised to use Friedrich Bastion's util-linux-ng based Device::Blkid module as the newer lib interface is (mostly) backward compatible with the old one. This module would prove useful in any situation where for any reason you are limited on your systems to a 1.xx.xx libblkid version which is a part of the e2fsprogs package. Incidentally, libblkid version numbering is based upon the version of either util-linux-ng or e2fsprogs of which it was a part and as such, e2fsprogs based versions of the library were all numbered v1.xx.xx whereas util-linux-ng versions are numbered as v2.15 or better which was the version of util-linux-ng in which it was added to that package. So just to be clear, when in doubt you are advised to grab Friedrich's newer util-linux-ng based libblkid interface module unless you have some specific reason as to why you can't, perhaps something similar to what led me to write this version. This package provides a Perl interface to the v1.xx.xx e2fsprogs-based versions of libblkid. It doesnot support the larger and more robust API which has been added and integrated into the libblkid library since its inclusion in the util-linux-ng package. See the preceding note for further details. Libblkid provides a clean and intuitive way of accessing block device topology on a system. It presents a common, unified approach to addressing, labelling and tagging various and sundry block devices in a standardized, mnemonic fashion and provides for a more familiar feel when dealing with various block devices and volumes. It also exposes basic file system query operations as well. There is an ever growing selection of software and utilities which now rely on libblkid and as more modern distributions of Linux migrate to lvm aware graphical installers, it is now standard fare. Recognizing that this is a Perl module, I have tried to provide a more 'Perlish' interface where possible rather than merely map Perl subs to C functions. For example, while client code can get a Perl object reference to the underlying C structures, they are at no time able to manipulate structure members. This decision was made as I could not conceive of any legitimate reasons for allowing for such access. In addition, rather than return C-like bools or binary return logic, I have, where the implementation lent itself, opted to return NULLs (mapped to undef via XSUB glue) and hash types when mutable C pointer parameters were provided in the C library. Please read the README file in the package archive for instructions should you encounter any problems while using this software package, as well as for instructions on building a debug version of this package. Finally, the e2fsprogs-based iterations of this library did infact grow in size over time. This package is fully compliant with versions of e2fsprogs at about 1.40.xx. I will, through the magic of conditional compilation with the C preprocessor, eventually support much older versions of the library and expose the choice of build to the end user by passing a version arg in to the Makefile.PL package within. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES Perl 5.10.0 This module also requires these other modules and libraries: e2fsprogs (pre v1.44) DEBUGGING and REPORTING A BUG If you have any problems with the functioning of this library, please contact me at my CPAN address at mroz@cpan.org. Please be sure and include a list of packages installed on your system or at least the exact version of e2fsprogs which you have installed. Also, please build and install a DEBU build of this library as detailed below, execute the application which is using this package and failing, and send me the verbose debugging output from the DEBUG build of this package. Should you wish to build a debug build of this library, please edit the Makefile.PL file and set the __DEBUG DEFINE flag as is shown in the file. After setting, rebuild the library as per The INSTALLATION instructions above. The debug build will produce much more verbose and chatty output to STDOUT detailing what is talking place in the underlying C codes. Please be sure and include all of this verbose output along with any problems you are having with this package. If you find any problems with this package and wish to submit a patch, please send the unified diff to my CPAN address including full patch instructions as well as a description of what issue or bug you have found and addressed. Please patch as per recommended best practices found in the patch(1) man page, under "NOTES FOR PATCH SENDERS". COPYRIGHT AND LICENCE Copyright (C) 2010 by Raymond Mroz This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available. THANKS Thanks to Friedrich for inspiration, especially your POD; its saved me hours of just pounding documenting calls in straight C into the lib. Thanks. BUGS No known bugs at this time. That said, this module is largely written in C and does contain a number of memory allocations. While these allocations are done inside of the libblkid itself, I do make every attempt to free the memory explicitly when I am done with it. That said, leaks are possible. Report any issues as is detailed above.