From 25a91b0a1b0ab3aea1afa6b144c6525924a55f9b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 4 Aug 2001 23:32:50 +0000 Subject: add is_ext3 --- perl-install/c/stuff.xs.pm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'perl-install/c/stuff.xs.pm') diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 235e929c3..a3952fb28 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -77,6 +77,10 @@ void rpmError_callback(void) { '; $ENV{C_DRAKX} and print ' + +#include +#include + #include void initIMPS2() { @@ -127,6 +131,23 @@ pcmcia_probe() $ENV{C_DRAKX} and print ' +int +is_ext3(device_name) + char * device_name + CODE: + { + ext2_filsys fs; + int retval = ext2fs_open (device_name, 0, 0, 0, unix_io_manager, &fs); + if (retval) { + RETVAL = 0; + } else { + RETVAL = fs->super->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL; + ext2fs_close(fs); + } + } + OUTPUT: + RETVAL + void setMouseLive(display, type, emulate3buttons) char *display -- cgit v1.2.1