New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

libfsxfs-python

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libfsxfs-python - pypi Package Compare versions

Comparing version
20220706
to
20220829
+138
ossfuzz/extended_attribute_fuzzer.cc
/*
* OSS-Fuzz target for libfsxfs extended_attribute type
*
* Copyright (C) 2020-2022, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 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 Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stddef.h>
#include <stdint.h>
/* Note that some of the OSS-Fuzz engines use C++
*/
extern "C" {
#include "ossfuzz_libbfio.h"
#include "ossfuzz_libfsxfs.h"
#if !defined( LIBFSXFS_HAVE_BFIO )
/* Opens a volume using a Basic File IO (bfio) handle
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_volume_open_file_io_handle(
libfsxfs_volume_t *volume,
libbfio_handle_t *file_io_handle,
int access_flags,
libfsxfs_error_t **error );
#endif /* !defined( LIBFSXFS_HAVE_BFIO ) */
int LLVMFuzzerTestOneInput(
const uint8_t *data,
size_t size )
{
libbfio_handle_t *file_io_handle = NULL;
libfsxfs_extended_attribute_t *extended_attribute = NULL;
libfsxfs_file_entry_t *file_entry = NULL;
libfsxfs_volume_t *volume = NULL;
int number_of_extended_attributes = 0;
int result = 0;
if( libbfio_memory_range_initialize(
&file_io_handle,
NULL ) != 1 )
{
return( 0 );
}
if( libbfio_memory_range_set(
file_io_handle,
(uint8_t *) data,
size,
NULL ) != 1 )
{
goto on_error_libbfio;
}
if( libfsxfs_volume_initialize(
&volume,
NULL ) != 1 )
{
goto on_error_libbfio;
}
if( libfsxfs_volume_open_file_io_handle(
volume,
file_io_handle,
LIBFSXFS_OPEN_READ,
NULL ) != 1 )
{
goto on_error_libfsxfs_volume;
}
result = libfsxfs_volume_get_file_entry_by_utf8_path(
volume,
(uint8_t *) "/a_directory/a_file",
19,
&file_entry,
NULL );
if( result == 1 )
{
if( libfsxfs_file_entry_get_number_of_extended_attributes(
file_entry,
&number_of_extended_attributes,
NULL ) != 1 )
{
goto on_error_libfsxfs_file_entry;
}
if( number_of_extended_attributes > 0 )
{
if( libfsxfs_file_entry_get_extended_attribute_by_index(
file_entry,
0,
&extended_attribute,
NULL ) != 1 )
{
goto on_error_libfsxfs_file_entry;
}
libfsxfs_extended_attribute_free(
&extended_attribute,
NULL );
}
on_error_libfsxfs_file_entry:
libfsxfs_file_entry_free(
&file_entry,
NULL );
}
libfsxfs_volume_close(
volume,
NULL );
on_error_libfsxfs_volume:
libfsxfs_volume_free(
&volume,
NULL );
on_error_libbfio:
libbfio_handle_free(
&file_io_handle,
NULL );
return( 0 );
}
} /* extern "C" */
+7
-7

@@ -11,7 +11,7 @@ /* common/config.h. Generated from config.h.in by configure. */

/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYCURRENT */
/* Define to 1 if you have the Mac OS X function
CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */

@@ -597,3 +597,3 @@ /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libfsxfs 20220706"
#define PACKAGE_STRING "libfsxfs 20220829"

@@ -607,3 +607,3 @@ /* Define to the one symbol short name of this package. */

/* Define to the version of this package. */
#define PACKAGE_VERSION "20220706"
#define PACKAGE_VERSION "20220829"

@@ -641,3 +641,3 @@ /* The size of `int', as computed by sizeof. */

/* Version number of package */
#define VERSION "20220706"
#define VERSION "20220829"

@@ -644,0 +644,0 @@ /* Number of bits in a file offset, on hosts where this is settable. */

@@ -10,7 +10,7 @@ /* common/config.h.in. Generated from configure.ac by autoheader. */

/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the Mac OS X function
CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */

@@ -17,0 +17,0 @@ #undef HAVE_CFPREFERENCESCOPYAPPVALUE

@@ -306,4 +306,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -310,0 +310,0 @@ NMEDIT = @NMEDIT@

/*
* Shows information obtained from an Extended File System (ext) volume
* Shows information obtained from a X File System (XFS) volume
*

@@ -73,4 +73,3 @@ * Copyright (C) 2020-2022, Joachim Metz <joachim.metz@gmail.com>

}
fprintf( stream, "Use fsxfsinfo to determine information about an Extended\n"
" File System (ext) volume.\n\n" );
fprintf( stream, "Use fsxfsinfo to determine information about a X File System (XFS) volume.\n\n" );

@@ -83,5 +82,6 @@ fprintf( stream, "Usage: fsxfsinfo [ -B bodyfile ] [ -E inode_number ] [ -F file_entry ]\n"

fprintf( stream, "\t-B: output file system information as a bodyfile\n" );
fprintf( stream, "\t-d: calculate a MD5 hash of a file entry to include in the bodyfile\n" );
fprintf( stream, "\t-E: show information about a specific inode or \"all\".\n" );
fprintf( stream, "\t-F: show information about a specific file entry path.\n" );
fprintf( stream, "\t-d: calculate a MD5 hash of a file entry to include in the\n"
"\t bodyfile\n" );
fprintf( stream, "\t-E: show information about a specific inode or \"all\"\n" );
fprintf( stream, "\t-F: show information about a specific file entry path\n" );
fprintf( stream, "\t-h: shows this help\n" );

@@ -88,0 +88,0 @@ fprintf( stream, "\t-H: shows the file system hierarchy\n" );

@@ -354,4 +354,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -358,0 +358,0 @@ NMEDIT = @NMEDIT@

@@ -314,18 +314,18 @@ /*

/* Retrieves the file entry of a specific inode number
/* Retrieves the root directory file entry
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_volume_get_file_entry_by_inode(
int libfsxfs_volume_get_root_directory(
libfsxfs_volume_t *volume,
uint64_t inode_number,
libfsxfs_file_entry_t **file_entry,
libfsxfs_error_t **error );
/* Retrieves the root directory file entry
/* Retrieves the file entry of a specific inode number
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_volume_get_root_directory(
int libfsxfs_volume_get_file_entry_by_inode(
libfsxfs_volume_t *volume,
uint64_t inode_number,
libfsxfs_file_entry_t **file_entry,

@@ -461,2 +461,12 @@ libfsxfs_error_t **error );

/* Retrieves the device identifier
* This value is retrieved from the inode
* Returns 1 if successful, 0 if not available or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_file_entry_get_device_identifier(
libfsxfs_file_entry_t *file_entry,
uint32_t *device_identifier,
libfsxfs_error_t **error );
/* Retrieves the device number

@@ -836,2 +846,23 @@ * This value is retrieved from the inode

/* Retrieves the number of extents
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_extended_attribute_get_number_of_extents(
libfsxfs_extended_attribute_t *extended_attribute,
int *number_of_extents,
libfsxfs_error_t **error );
/* Retrieves a specific extent
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_extended_attribute_get_extent_by_index(
libfsxfs_extended_attribute_t *extended_attribute,
int extent_index,
off64_t *extent_offset,
size64_t *extent_size,
uint32_t *extent_flags,
libfsxfs_error_t **error );
#if defined( __cplusplus )

@@ -838,0 +869,0 @@ }

@@ -314,18 +314,18 @@ /*

/* Retrieves the file entry of a specific inode number
/* Retrieves the root directory file entry
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_volume_get_file_entry_by_inode(
int libfsxfs_volume_get_root_directory(
libfsxfs_volume_t *volume,
uint64_t inode_number,
libfsxfs_file_entry_t **file_entry,
libfsxfs_error_t **error );
/* Retrieves the root directory file entry
/* Retrieves the file entry of a specific inode number
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_volume_get_root_directory(
int libfsxfs_volume_get_file_entry_by_inode(
libfsxfs_volume_t *volume,
uint64_t inode_number,
libfsxfs_file_entry_t **file_entry,

@@ -461,2 +461,12 @@ libfsxfs_error_t **error );

/* Retrieves the device identifier
* This value is retrieved from the inode
* Returns 1 if successful, 0 if not available or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_file_entry_get_device_identifier(
libfsxfs_file_entry_t *file_entry,
uint32_t *device_identifier,
libfsxfs_error_t **error );
/* Retrieves the device number

@@ -836,2 +846,23 @@ * This value is retrieved from the inode

/* Retrieves the number of extents
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_extended_attribute_get_number_of_extents(
libfsxfs_extended_attribute_t *extended_attribute,
int *number_of_extents,
libfsxfs_error_t **error );
/* Retrieves a specific extent
* Returns 1 if successful or -1 on error
*/
LIBFSXFS_EXTERN \
int libfsxfs_extended_attribute_get_extent_by_index(
libfsxfs_extended_attribute_t *extended_attribute,
int extent_index,
off64_t *extent_offset,
size64_t *extent_size,
uint32_t *extent_flags,
libfsxfs_error_t **error );
#if defined( __cplusplus )

@@ -838,0 +869,0 @@ }

@@ -27,7 +27,7 @@ /*

#define LIBFSXFS_VERSION 20220706
#define LIBFSXFS_VERSION 20220829
/* The version string
*/
#define LIBFSXFS_VERSION_STRING "20220706"
#define LIBFSXFS_VERSION_STRING "20220829"

@@ -34,0 +34,0 @@ /* The file access

@@ -336,4 +336,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -340,0 +340,0 @@ NMEDIT = @NMEDIT@

@@ -371,4 +371,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -375,0 +375,0 @@ NMEDIT = @NMEDIT@

@@ -367,4 +367,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -371,0 +371,0 @@ NMEDIT = @NMEDIT@

@@ -346,4 +346,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -350,0 +350,0 @@ NMEDIT = @NMEDIT@

@@ -353,4 +353,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -357,0 +357,0 @@ NMEDIT = @NMEDIT@

@@ -350,4 +350,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -354,0 +354,0 @@ NMEDIT = @NMEDIT@

@@ -349,4 +349,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -353,0 +353,0 @@ NMEDIT = @NMEDIT@

@@ -347,4 +347,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -351,0 +351,0 @@ NMEDIT = @NMEDIT@

@@ -357,4 +357,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -361,0 +361,0 @@ NMEDIT = @NMEDIT@

@@ -371,4 +371,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -375,0 +375,0 @@ NMEDIT = @NMEDIT@

@@ -353,4 +353,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -357,0 +357,0 @@ NMEDIT = @NMEDIT@

@@ -373,4 +373,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -377,0 +377,0 @@ NMEDIT = @NMEDIT@

@@ -368,4 +368,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -372,0 +372,0 @@ NMEDIT = @NMEDIT@

@@ -346,4 +346,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -350,0 +350,0 @@ NMEDIT = @NMEDIT@

@@ -801,3 +801,5 @@ /*

block_offset = ( ( (off64_t) allocation_group_index * io_handle->allocation_group_size ) + relative_block_number ) * io_handle->block_size;
block_offset = ( (off64_t) allocation_group_index * io_handle->allocation_group_size ) + relative_block_number;
block_offset += block_number - extent->logical_block_number;
block_offset *= io_handle->block_size;

@@ -804,0 +806,0 @@ if( libfsxfs_file_system_block_initialize(

@@ -40,7 +40,7 @@ /*

#else
#define LIBFSXFS_VERSION 20220706
#define LIBFSXFS_VERSION 20220829
/* The version string
*/
#define LIBFSXFS_VERSION_STRING "20220706"
#define LIBFSXFS_VERSION_STRING "20220829"

@@ -47,0 +47,0 @@ /* The file access

@@ -29,2 +29,3 @@ /*

#include "libfsxfs_extended_attribute.h"
#include "libfsxfs_extent.h"
#include "libfsxfs_file_system.h"

@@ -1015,1 +1016,172 @@ #include "libfsxfs_inode.h"

/* Retrieves the number of extents
* Returns 1 if successful or -1 on error
*/
int libfsxfs_extended_attribute_get_number_of_extents(
libfsxfs_extended_attribute_t *extended_attribute,
int *number_of_extents,
libcerror_error_t **error )
{
libfsxfs_internal_extended_attribute_t *internal_extended_attribute = NULL;
static char *function = "libfsxfs_extended_attribute_get_number_of_extents";
int result = 1;
if( extended_attribute == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
"%s: invalid extended attribute.",
function );
return( -1 );
}
internal_extended_attribute = (libfsxfs_internal_extended_attribute_t *) extended_attribute;
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_grab_for_write(
internal_extended_attribute->read_write_lock,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to grab read/write lock for writing.",
function );
return( -1 );
}
#endif
if( libfsxfs_inode_get_number_of_attributes_extents(
internal_extended_attribute->inode,
number_of_extents,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_GET_FAILED,
"%s: unable to retrieve number of attribute extents.",
function );
result = -1;
}
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_release_for_write(
internal_extended_attribute->read_write_lock,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to release read/write lock for writing.",
function );
return( -1 );
}
#endif
return( result );
}
/* Retrieves a specific extent
* Returns 1 if successful or -1 on error
*/
int libfsxfs_extended_attribute_get_extent_by_index(
libfsxfs_extended_attribute_t *extended_attribute,
int extent_index,
off64_t *extent_offset,
size64_t *extent_size,
uint32_t *extent_flags,
libcerror_error_t **error )
{
libfsxfs_extent_t *extent = NULL;
libfsxfs_internal_extended_attribute_t *internal_extended_attribute = NULL;
static char *function = "libfsxfs_extended_attribute_get_extent_by_index";
int result = 1;
if( extended_attribute == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
"%s: invalid extended attribute.",
function );
return( -1 );
}
internal_extended_attribute = (libfsxfs_internal_extended_attribute_t *) extended_attribute;
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_grab_for_write(
internal_extended_attribute->read_write_lock,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to grab read/write lock for writing.",
function );
return( -1 );
}
#endif
if( libfsxfs_inode_get_attributes_extent_by_index(
internal_extended_attribute->inode,
extent_index,
&extent,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_GET_FAILED,
"%s: unable to retrieve attribute extent: %d.",
function,
extent_index );
result = -1;
}
if( result == 1 )
{
if( libfsxfs_extent_get_values(
extent,
internal_extended_attribute->io_handle,
extent_offset,
extent_size,
extent_flags,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_GET_FAILED,
"%s: unable to retrieve extent: %d values.",
function,
extent_index );
result = -1;
}
}
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_release_for_write(
internal_extended_attribute->read_write_lock,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to release read/write lock for writing.",
function );
return( -1 );
}
#endif
return( result );
}

@@ -157,2 +157,17 @@ /*

LIBFSXFS_EXTERN \
int libfsxfs_extended_attribute_get_number_of_extents(
libfsxfs_extended_attribute_t *extended_attribute,
int *number_of_extents,
libcerror_error_t **error );
LIBFSXFS_EXTERN \
int libfsxfs_extended_attribute_get_extent_by_index(
libfsxfs_extended_attribute_t *extended_attribute,
int extent_index,
off64_t *extent_offset,
size64_t *extent_size,
uint32_t *extent_flags,
libcerror_error_t **error );
#if defined( __cplusplus )

@@ -159,0 +174,0 @@ }

@@ -182,2 +182,8 @@ /*

LIBFSXFS_EXTERN \
int libfsxfs_file_entry_get_device_identifier(
libfsxfs_file_entry_t *file_entry,
uint32_t *device_identifier,
libcerror_error_t **error );
LIBFSXFS_EXTERN \
int libfsxfs_file_entry_get_device_number(

@@ -184,0 +190,0 @@ libfsxfs_file_entry_t *file_entry,

@@ -965,3 +965,3 @@ /*

libcnotify_printf(
"%s: device information data:\n",
"%s: device identifier data:\n",
function );

@@ -977,3 +977,3 @@ libcnotify_print_data(

&( inode->data[ inode->data_fork_offset ] ),
inode->device_information );
inode->device_identifier );
}

@@ -1626,2 +1626,43 @@ else if( inode->fork_type == LIBFSXFS_FORK_TYPE_INLINE_DATA )

/* Retrieves the device identifier
* Returns 1 if successful, 0 if not available or -1 on error
*/
int libfsxfs_inode_get_device_identifier(
libfsxfs_inode_t *inode,
uint32_t *device_identifier,
libcerror_error_t **error )
{
static char *function = "libfsxfs_inode_get_device_identifier";
if( inode == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
"%s: invalid inode.",
function );
return( -1 );
}
if( device_identifier == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
"%s: invalid device identifier.",
function );
return( -1 );
}
if( inode->fork_type == LIBFSXFS_FORK_TYPE_DEVICE )
{
*device_identifier = inode->device_identifier;
return( 1 );
}
return( 0 );
}
/* Retrieves the device number

@@ -1673,4 +1714,4 @@ * Returns 1 if successful, 0 if not available or -1 on error

{
*major_device_number = inode->device_information >> 18;
*minor_device_number = inode->device_information & 0x0003ffffUL;
*major_device_number = inode->device_identifier >> 18;
*minor_device_number = inode->device_identifier & 0x0003ffffUL;

@@ -1677,0 +1718,0 @@ return( 1 );

@@ -94,5 +94,5 @@ /*

/* Device information
/* Device identifier
*/
uint32_t device_information;
uint32_t device_identifier;

@@ -211,2 +211,7 @@ /* Inline data

int libfsxfs_inode_get_device_identifier(
libfsxfs_inode_t *inode,
uint32_t *device_identifier,
libcerror_error_t **error );
int libfsxfs_inode_get_device_number(

@@ -213,0 +218,0 @@ libfsxfs_inode_t *inode,

@@ -1605,15 +1605,16 @@ /*

/* Retrieves the file entry of a specific inode
/* Retrieves the root directory file entry
* Returns 1 if successful or -1 on error
*/
int libfsxfs_internal_volume_get_file_entry_by_inode(
libfsxfs_internal_volume_t *internal_volume,
uint64_t inode_number,
int libfsxfs_volume_get_root_directory(
libfsxfs_volume_t *volume,
libfsxfs_file_entry_t **file_entry,
libcerror_error_t **error )
{
libfsxfs_inode_t *inode = NULL;
static char *function = "libfsxfs_internal_volume_get_file_entry_by_inode";
libfsxfs_inode_t *inode = NULL;
libfsxfs_internal_volume_t *internal_volume = NULL;
static char *function = "libfsxfs_volume_get_root_directory";
int result = 1;
if( internal_volume == NULL )
if( volume == NULL )
{

@@ -1629,2 +1630,15 @@ libcerror_error_set(

}
internal_volume = (libfsxfs_internal_volume_t *) volume;
if( internal_volume->superblock == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
"%s: invalid internal volume - missing superblock.",
function );
return( -1 );
}
if( file_entry == NULL )

@@ -1652,2 +1666,17 @@ {

}
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_grab_for_write(
internal_volume->read_write_lock,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to grab read/write lock for writing.",
function );
return( -1 );
}
#endif
if( libfsxfs_file_system_get_inode_by_number(

@@ -1657,3 +1686,3 @@ internal_volume->file_system,

internal_volume->file_io_handle,
inode_number,
internal_volume->superblock->root_directory_inode_number,
&inode,

@@ -1668,17 +1697,15 @@ error ) != 1 )

function,
inode_number );
internal_volume->superblock->root_directory_inode_number );
goto on_error;
result = -1;
}
/* libfsxfs_file_entry_initialize takes over management of inode
*/
if( libfsxfs_file_entry_initialize(
file_entry,
internal_volume->io_handle,
internal_volume->file_io_handle,
internal_volume->file_system,
inode_number,
inode,
NULL,
error ) != 1 )
else if( libfsxfs_file_entry_initialize(
file_entry,
internal_volume->io_handle,
internal_volume->file_io_handle,
internal_volume->file_system,
internal_volume->superblock->root_directory_inode_number,
inode,
NULL,
error ) != 1 )
{

@@ -1692,14 +1719,28 @@ libcerror_error_set(

goto on_error;
}
return( 1 );
on_error:
if( inode != NULL )
{
libfsxfs_inode_free(
&inode,
NULL );
result = -1;
}
return( -1 );
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_release_for_write(
internal_volume->read_write_lock,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to release read/write lock for writing.",
function );
libfsxfs_file_entry_free(
file_entry,
NULL );
return( -1 );
}
#endif
return( result );
}

@@ -1710,4 +1751,4 @@

*/
int libfsxfs_volume_get_file_entry_by_inode(
libfsxfs_volume_t *volume,
int libfsxfs_internal_volume_get_file_entry_by_inode(
libfsxfs_internal_volume_t *internal_volume,
uint64_t inode_number,

@@ -1717,7 +1758,6 @@ libfsxfs_file_entry_t **file_entry,

{
libfsxfs_internal_volume_t *internal_volume = NULL;
static char *function = "libfsxfs_volume_get_file_entry_by_inode";
int result = 1;
libfsxfs_inode_t *inode = NULL;
static char *function = "libfsxfs_internal_volume_get_file_entry_by_inode";
if( volume == NULL )
if( internal_volume == NULL )
{

@@ -1733,4 +1773,2 @@ libcerror_error_set(

}
internal_volume = (libfsxfs_internal_volume_t *) volume;
if( file_entry == NULL )

@@ -1758,21 +1796,8 @@ {

}
#if defined( HAVE_LIBFSEXT_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_grab_for_write(
internal_volume->read_write_lock,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to grab read/write lock for writing.",
function );
return( -1 );
}
#endif
if( libfsxfs_internal_volume_get_file_entry_by_inode(
internal_volume,
if( libfsxfs_file_system_get_inode_by_number(
internal_volume->file_system,
internal_volume->io_handle,
internal_volume->file_io_handle,
inode_number,
file_entry,
&inode,
error ) != 1 )

@@ -1788,7 +1813,14 @@ {

result = -1;
goto on_error;
}
#if defined( HAVE_LIBFSEXT_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_release_for_write(
internal_volume->read_write_lock,
/* libfsxfs_file_entry_initialize takes over management of inode
*/
if( libfsxfs_file_entry_initialize(
file_entry,
internal_volume->io_handle,
internal_volume->file_io_handle,
internal_volume->file_system,
inode_number,
inode,
NULL,
error ) != 1 )

@@ -1799,27 +1831,31 @@ {

LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_SET_FAILED,
"%s: unable to release read/write lock for writing.",
LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
"%s: unable to create file entry.",
function );
libfsxfs_file_entry_free(
file_entry,
goto on_error;
}
return( 1 );
on_error:
if( inode != NULL )
{
libfsxfs_inode_free(
&inode,
NULL );
return( -1 );
}
#endif
return( result );
return( -1 );
}
/* Retrieves the root directory file entry
/* Retrieves the file entry of a specific inode
* Returns 1 if successful or -1 on error
*/
int libfsxfs_volume_get_root_directory(
int libfsxfs_volume_get_file_entry_by_inode(
libfsxfs_volume_t *volume,
uint64_t inode_number,
libfsxfs_file_entry_t **file_entry,
libcerror_error_t **error )
{
libfsxfs_inode_t *inode = NULL;
libfsxfs_internal_volume_t *internal_volume = NULL;
static char *function = "libfsxfs_volume_get_root_directory";
static char *function = "libfsxfs_volume_get_file_entry_by_inode";
int result = 1;

@@ -1840,13 +1876,2 @@

if( internal_volume->superblock == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
"%s: invalid internal volume - missing superblock.",
function );
return( -1 );
}
if( file_entry == NULL )

@@ -1874,3 +1899,3 @@ {

}
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
#if defined( HAVE_LIBFSEXT_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_grab_for_write(

@@ -1890,8 +1915,6 @@ internal_volume->read_write_lock,

#endif
if( libfsxfs_file_system_get_inode_by_number(
internal_volume->file_system,
internal_volume->io_handle,
internal_volume->file_io_handle,
internal_volume->superblock->root_directory_inode_number,
&inode,
if( libfsxfs_internal_volume_get_file_entry_by_inode(
internal_volume,
inode_number,
file_entry,
error ) != 1 )

@@ -1905,30 +1928,7 @@ {

function,
internal_volume->superblock->root_directory_inode_number );
inode_number );
result = -1;
}
else if( libfsxfs_file_entry_initialize(
file_entry,
internal_volume->io_handle,
internal_volume->file_io_handle,
internal_volume->file_system,
internal_volume->superblock->root_directory_inode_number,
inode,
NULL,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
"%s: unable to create file entry.",
function );
libfsxfs_inode_free(
&inode,
NULL );
result = -1;
}
#if defined( HAVE_LIBFSXFS_MULTI_THREAD_SUPPORT )
#if defined( HAVE_LIBFSEXT_MULTI_THREAD_SUPPORT )
if( libcthreads_read_write_lock_release_for_write(

@@ -1935,0 +1935,0 @@ internal_volume->read_write_lock,

@@ -164,2 +164,8 @@ /*

LIBFSXFS_EXTERN \
int libfsxfs_volume_get_root_directory(
libfsxfs_volume_t *volume,
libfsxfs_file_entry_t **file_entry,
libcerror_error_t **error );
int libfsxfs_internal_volume_get_file_entry_by_inode(

@@ -178,8 +184,2 @@ libfsxfs_internal_volume_t *internal_volume,

LIBFSXFS_EXTERN \
int libfsxfs_volume_get_root_directory(
libfsxfs_volume_t *volume,
libfsxfs_file_entry_t **file_entry,
libcerror_error_t **error );
int libfsxfs_internal_volume_get_file_entry_by_utf8_path(

@@ -186,0 +186,0 @@ libfsxfs_internal_volume_t *internal_volume,

@@ -425,4 +425,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -429,0 +429,0 @@ NMEDIT = @NMEDIT@

@@ -350,4 +350,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -354,0 +354,0 @@ NMEDIT = @NMEDIT@

@@ -525,4 +525,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -529,0 +529,0 @@ NMEDIT = @NMEDIT@

@@ -406,4 +406,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -410,0 +410,0 @@ NMEDIT = @NMEDIT@

@@ -320,4 +320,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -324,0 +324,0 @@ NMEDIT = @NMEDIT@

@@ -288,4 +288,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -292,0 +292,0 @@ NMEDIT = @NMEDIT@

@@ -91,3 +91,3 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

host_triplet = @host@
@HAVE_LIB_FUZZING_ENGINE_TRUE@bin_PROGRAMS = \
@HAVE_LIB_FUZZING_ENGINE_TRUE@bin_PROGRAMS = extended_attribute_fuzzer$(EXEEXT) \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ file_entry_fuzzer$(EXEEXT) \

@@ -126,2 +126,14 @@ @HAVE_LIB_FUZZING_ENGINE_TRUE@ volume_fuzzer$(EXEEXT)

PROGRAMS = $(bin_PROGRAMS)
am__extended_attribute_fuzzer_SOURCES_DIST = \
extended_attribute_fuzzer.cc ossfuzz_libbfio.h \
ossfuzz_libfsxfs.h
@HAVE_LIB_FUZZING_ENGINE_TRUE@am_extended_attribute_fuzzer_OBJECTS = extended_attribute_fuzzer.$(OBJEXT)
extended_attribute_fuzzer_OBJECTS = \
$(am_extended_attribute_fuzzer_OBJECTS)
@HAVE_LIB_FUZZING_ENGINE_TRUE@extended_attribute_fuzzer_DEPENDENCIES = \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfsxfs/libfsxfs.la
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
am__file_entry_fuzzer_SOURCES_DIST = file_entry_fuzzer.cc \

@@ -134,6 +146,2 @@ ossfuzz_libbfio.h ossfuzz_libfsxfs.h

@HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfsxfs/libfsxfs.la
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
am__volume_fuzzer_SOURCES_DIST = ossfuzz_libbfio.h ossfuzz_libfsxfs.h \

@@ -161,4 +169,4 @@ volume_fuzzer.cc

am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/file_entry_fuzzer.Po \
./$(DEPDIR)/volume_fuzzer.Po
am__depfiles_remade = ./$(DEPDIR)/extended_attribute_fuzzer.Po \
./$(DEPDIR)/file_entry_fuzzer.Po ./$(DEPDIR)/volume_fuzzer.Po
am__mv = mv -f

@@ -201,4 +209,6 @@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \

am__v_CCLD_1 =
SOURCES = $(file_entry_fuzzer_SOURCES) $(volume_fuzzer_SOURCES)
DIST_SOURCES = $(am__file_entry_fuzzer_SOURCES_DIST) \
SOURCES = $(extended_attribute_fuzzer_SOURCES) \
$(file_entry_fuzzer_SOURCES) $(volume_fuzzer_SOURCES)
DIST_SOURCES = $(am__extended_attribute_fuzzer_SOURCES_DIST) \
$(am__file_entry_fuzzer_SOURCES_DIST) \
$(am__volume_fuzzer_SOURCES_DIST)

@@ -376,4 +386,4 @@ am__can_run_installinfo = \

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -601,2 +611,20 @@ NMEDIT = @NMEDIT@

@HAVE_LIB_FUZZING_ENGINE_TRUE@extended_attribute_fuzzer_SOURCES = \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ extended_attribute_fuzzer.cc \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libfsxfs.h
@HAVE_LIB_FUZZING_ENGINE_TRUE@extended_attribute_fuzzer_LDADD = \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIB_FUZZING_ENGINE@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libfsxfs/libfsxfs.la \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_LIBADD@ \
@HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBINTL@
@HAVE_LIB_FUZZING_ENGINE_TRUE@file_entry_fuzzer_SOURCES = \

@@ -724,2 +752,6 @@ @HAVE_LIB_FUZZING_ENGINE_TRUE@ file_entry_fuzzer.cc \

extended_attribute_fuzzer$(EXEEXT): $(extended_attribute_fuzzer_OBJECTS) $(extended_attribute_fuzzer_DEPENDENCIES) $(EXTRA_extended_attribute_fuzzer_DEPENDENCIES)
@rm -f extended_attribute_fuzzer$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(extended_attribute_fuzzer_OBJECTS) $(extended_attribute_fuzzer_LDADD) $(LIBS)
file_entry_fuzzer$(EXEEXT): $(file_entry_fuzzer_OBJECTS) $(file_entry_fuzzer_DEPENDENCIES) $(EXTRA_file_entry_fuzzer_DEPENDENCIES)

@@ -739,2 +771,3 @@ @rm -f file_entry_fuzzer$(EXEEXT)

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extended_attribute_fuzzer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_entry_fuzzer.Po@am__quote@ # am--include-marker

@@ -946,3 +979,4 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volume_fuzzer.Po@am__quote@ # am--include-marker

maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/file_entry_fuzzer.Po
-rm -f ./$(DEPDIR)/extended_attribute_fuzzer.Po
-rm -f ./$(DEPDIR)/file_entry_fuzzer.Po
-rm -f ./$(DEPDIR)/volume_fuzzer.Po

@@ -990,2 +1024,4 @@ -rm -f Makefile

splint:
@echo "Running splint on extended_attribute_fuzzer ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(extended_attribute_fuzzer_SOURCES)
@echo "Running splint on file_entry_fuzzer ..."

@@ -992,0 +1028,0 @@ -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_entry_fuzzer_SOURCES)

@@ -50,4 +50,9 @@ /*

{
uint8_t string_value[ 64 ];
libbfio_handle_t *file_io_handle = NULL;
libfsxfs_volume_t *volume = NULL;
size_t string_size = 0;
uint8_t format_version = 0;
int result = 0;

@@ -74,15 +79,30 @@ if( libbfio_memory_range_initialize(

}
if( libfsxfs_volume_open_file_io_handle(
volume,
file_io_handle,
LIBFSXFS_OPEN_READ,
NULL ) != 1 )
result = libfsxfs_volume_open_file_io_handle(
volume,
file_io_handle,
LIBFSXFS_OPEN_READ,
NULL );
if( result != -1 )
{
goto on_error_libfsxfs;
libfsxfs_volume_get_format_version(
volume,
&format_version,
NULL );
libfsxfs_volume_get_utf8_label_size(
volume,
&string_size,
NULL );
libfsxfs_volume_get_utf8_label(
volume,
string_value,
64,
NULL );
libfsxfs_volume_close(
volume,
NULL );
}
libfsxfs_volume_close(
volume,
NULL );
on_error_libfsxfs:
libfsxfs_volume_free(

@@ -89,0 +109,0 @@ &volume,

Metadata-Version: 2.1
Name: libfsxfs-python
Version: 20220706
Version: 20220829
Summary: Python bindings module for libfsxfs

@@ -10,2 +10,3 @@ Home-page: https://github.com/libyal/libfsxfs/

Platform: UNKNOWN
Description-Content-Type: text/plain
License-File: COPYING

@@ -12,0 +13,0 @@ License-File: COPYING.LESSER

# Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2000-2020 Free Software Foundation, Inc.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
# License but which still want to provide support for the GNU gettext
# functionality.
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
#
# Origin: gettext-0.18
GETTEXT_MACRO_VERSION = 0.18
# Origin: gettext-0.21
GETTEXT_MACRO_VERSION = 0.20

@@ -18,2 +17,3 @@ PACKAGE = @PACKAGE@

SED = @SED@
SHELL = /bin/sh

@@ -48,2 +48,7 @@ @SET_MAKE@

# When building gettext-tools, we prefer to use the built programs
# rather than installed programs. However, we can't do that when we
# are cross compiling.
CROSS_COMPILING = @CROSS_COMPILING@
GMSGFMT_ = @GMSGFMT@

@@ -53,6 +58,2 @@ GMSGFMT_no = @GMSGFMT@

GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
MSGFMT_ = @MSGFMT@
MSGFMT_no = @MSGFMT@
MSGFMT_yes = @MSGFMT_015@
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
XGETTEXT_ = @XGETTEXT@

@@ -62,4 +63,5 @@ XGETTEXT_no = @XGETTEXT@

XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
MSGMERGE = msgmerge
MSGMERGE = @MSGMERGE@
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
MSGINIT = msginit

@@ -83,16 +85,45 @@ MSGCONV = msgconv

POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
POFILESDEPS_yes = $(POFILESDEPS_)
POFILESDEPS_no =
POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
DISTFILESDEPS_ = update-po
DISTFILESDEPS_yes = $(DISTFILESDEPS_)
DISTFILESDEPS_no =
DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
# Makevars gets inserted here. (Don't remove this line!)
all: all-@USE_NLS@
.SUFFIXES:
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
.po.mo:
@echo "$(MSGFMT) -c -o $@ $<"; \
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs.
# The GNU Coding Standards say in
# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
# "GNU distributions usually contain some files which are not source files
# ... . Since these files normally appear in the source directory, they
# should always appear in the source directory, not in the build directory.
# So Makefile rules to update them should put the updated files in the
# source directory."
# Therefore we put these files in the source directory, not the build directory.
# During .po -> .gmo conversion, take into account the most recent changes to
# the .pot file. This eliminates the need to update the .po files when the
# .pot file has changed, which would be troublesome if the .po files are put
# under version control.
$(GMOFILES): $(srcdir)/$(DOMAIN).pot
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
cd $(srcdir) && \
rm -f $${lang}.gmo && \
$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \
$(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \
mv t-$${lang}.gmo $${lang}.gmo && \
rm -f $${lang}.1po

@@ -104,10 +135,8 @@ .sin.sed:

all: check-macro-version all-@USE_NLS@
all-yes: stamp-po
all-yes: $(srcdir)/stamp-po
all-no:
# Ensure that the gettext macros and this Makefile.in.in are in sync.
check-macro-version:
@test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
CHECK_MACRO_VERSION = \
test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \

@@ -121,19 +150,20 @@ exit 1; \

# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
# In this case, stamp-po is a nop (i.e. a phony target).
# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target).
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
# been loosely updated. Its purpose is that when a developer or translator
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
# invocations of "make" will do nothing. This timestamp would not be necessary
# if updating the $(CATALOGS) would always touch them; however, the rule for
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS
# have been loosely updated. Its purpose is that when a developer or translator
# checks out the package from a version control system, and the $(DOMAIN).pot
# file is not under version control, "make" will update the $(DOMAIN).pot and
# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This
# timestamp would not be necessary if updating the $(CATALOGS) would always
# touch them; however, the rule for $(POFILES) has been designed to not touch
# files that don't need to be changed.
$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot
@$(CHECK_MACRO_VERSION)
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
echo "touch stamp-po" && \
echo timestamp > stamp-poT && \
mv stamp-poT stamp-po; \
echo "touch $(srcdir)/stamp-po" && \
echo timestamp > $(srcdir)/stamp-poT && \
mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \
}

@@ -147,7 +177,23 @@

# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
# The determination of whether the package xyz is a GNU one is based on the
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
package_gnu='GNU '; \
package_gnu="$(PACKAGE_GNU)"; \
test -n "$$package_gnu" || { \
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
else \
LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
fi; \
} | grep -v 'libtool:' >/dev/null; then \
package_gnu=yes; \
else \
package_gnu=no; \
fi; \
}; \
if test "$$package_gnu" = "yes"; then \
package_prefix='GNU '; \
else \
package_gnu=''; \
package_prefix=''; \
fi; \

@@ -162,18 +208,26 @@ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \

$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--add-comments=TRANSLATORS: \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address" \
$(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
;; \
*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--add-comments=TRANSLATORS: \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--package-name="$${package_gnu}@PACKAGE@" \
--package-name="$${package_prefix}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
$(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
;; \
esac
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot-header; then \
sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
rm -f $(DOMAIN).1po \
|| exit 1; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \

@@ -201,13 +255,16 @@ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \

# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot
$(POFILES): $(POFILESDEPS)
@test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) \
&& { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
0.1[6-7] | 0.1[6-7].*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \
esac; \

@@ -347,5 +404,7 @@ }; \

install-dvi install-ps install-pdf install-html:
mostlyclean:
rm -f remove-potcdate.sed
rm -f stamp-poT
rm -f $(srcdir)/stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po

@@ -357,3 +416,3 @@ rm -fr *.o

distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo
rm -f Makefile Makefile.in POTFILES

@@ -363,11 +422,11 @@ maintainer-clean: distclean

@echo "it deletes files that may require special tools to rebuild."
rm -f stamp-po $(GMOFILES)
rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
dists="$(DISTFILES)"; \
dist2: $(srcdir)/stamp-po $(DISTFILES)
@dists="$(DISTFILES)"; \
if test "$(PACKAGE)" = "gettext-tools"; then \

@@ -378,2 +437,7 @@ dists="$$dists Makevars.template"; \

dists="$$dists $(DOMAIN).pot stamp-po"; \
else \
case $(XGETTEXT) in \
:) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \
*) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \
esac; \
fi; \

@@ -413,13 +477,15 @@ if test -f $(srcdir)/ChangeLog; then \

@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
0.1[6-7] | 0.1[6-7].*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
esac; \

@@ -426,0 +492,0 @@ }; then \

@@ -385,4 +385,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -389,0 +389,0 @@ NMEDIT = @NMEDIT@

@@ -385,4 +385,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -389,0 +389,0 @@ NMEDIT = @NMEDIT@

@@ -397,4 +397,4 @@ # Makefile.in generated by automake 1.16.5 from Makefile.am.

MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
NM = @NM@

@@ -401,0 +401,0 @@ NMEDIT = @NMEDIT@

@@ -102,2 +102,16 @@ /*

{ "get_number_of_extents",
(PyCFunction) pyfsxfs_extended_attribute_get_number_of_extents,
METH_NOARGS,
"get_number_of_extents() -> Integer\n"
"\n"
"Retrieves the number of extents." },
{ "get_extent",
(PyCFunction) pyfsxfs_extended_attribute_get_extent,
METH_VARARGS | METH_KEYWORDS,
"get_extent(extent_index) -> Tuple(Integer, Integer, Integer)\n"
"\n"
"Retrieves the extent specified by the index." },
/* Sentinel */

@@ -1097,1 +1111,191 @@ { NULL, NULL, 0, NULL }

/* Retrieves the number of extents
* Returns a Python object if successful or NULL on error
*/
PyObject *pyfsxfs_extended_attribute_get_number_of_extents(
pyfsxfs_extended_attribute_t *pyfsxfs_extended_attribute,
PyObject *arguments PYFSXFS_ATTRIBUTE_UNUSED )
{
PyObject *integer_object = NULL;
libcerror_error_t *error = NULL;
static char *function = "pyfsxfs_extended_attribute_get_number_of_extents";
int number_of_extents = 0;
int result = 0;
PYFSXFS_UNREFERENCED_PARAMETER( arguments )
if( pyfsxfs_extended_attribute == NULL )
{
PyErr_Format(
PyExc_ValueError,
"%s: invalid extended attribute.",
function );
return( NULL );
}
Py_BEGIN_ALLOW_THREADS
result = libfsxfs_extended_attribute_get_number_of_extents(
pyfsxfs_extended_attribute->extended_attribute,
&number_of_extents,
&error );
Py_END_ALLOW_THREADS
if( result != 1 )
{
pyfsxfs_error_raise(
error,
PyExc_IOError,
"%s: unable to retrieve number of extents.",
function );
libcerror_error_free(
&error );
return( NULL );
}
#if PY_MAJOR_VERSION >= 3
integer_object = PyLong_FromLong(
(long) number_of_extents );
#else
integer_object = PyInt_FromLong(
(long) number_of_extents );
#endif
return( integer_object );
}
/* Retrieves a specific extent by index
* Returns a Python object if successful or NULL on error
*/
PyObject *pyfsxfs_extended_attribute_get_extent_by_index(
pyfsxfs_extended_attribute_t *pyfsxfs_extended_attribute,
int extent_index )
{
libcerror_error_t *error = NULL;
PyObject *integer_object = NULL;
PyObject *tuple_object = NULL;
static char *function = "pyfsxfs_extended_attribute_get_extent_by_index";
off64_t extent_offset = 0;
size64_t extent_size = 0;
uint32_t extent_flags = 0;
int result = 0;
if( pyfsxfs_extended_attribute == NULL )
{
PyErr_Format(
PyExc_TypeError,
"%s: invalid extended attribute.",
function );
return( NULL );
}
Py_BEGIN_ALLOW_THREADS
result = libfsxfs_extended_attribute_get_extent_by_index(
pyfsxfs_extended_attribute->extended_attribute,
extent_index,
&extent_offset,
&extent_size,
&extent_flags,
&error );
Py_END_ALLOW_THREADS
if( result != 1 )
{
pyfsxfs_error_raise(
error,
PyExc_IOError,
"%s: unable to retrieve extent: %d.",
function,
extent_index );
libcerror_error_free(
&error );
goto on_error;
}
tuple_object = PyTuple_New(
3 );
integer_object = pyfsxfs_integer_signed_new_from_64bit(
(int64_t) extent_offset );
/* Tuple set item does not increment the reference count of the integer object
*/
if( PyTuple_SetItem(
tuple_object,
0,
integer_object ) != 0 )
{
goto on_error;
}
integer_object = pyfsxfs_integer_unsigned_new_from_64bit(
(uint64_t) extent_size );
/* Tuple set item does not increment the reference count of the integer object
*/
if( PyTuple_SetItem(
tuple_object,
1,
integer_object ) != 0 )
{
goto on_error;
}
integer_object = pyfsxfs_integer_unsigned_new_from_64bit(
(uint64_t) extent_flags );
/* Tuple set item does not increment the reference count of the integer object
*/
if( PyTuple_SetItem(
tuple_object,
2,
integer_object ) != 0 )
{
goto on_error;
}
return( tuple_object );
on_error:
if( integer_object != NULL )
{
Py_DecRef(
(PyObject *) integer_object );
}
if( tuple_object != NULL )
{
Py_DecRef(
(PyObject *) tuple_object );
}
return( NULL );
}
/* Retrieves a specific extent
* Returns a Python object if successful or NULL on error
*/
PyObject *pyfsxfs_extended_attribute_get_extent(
pyfsxfs_extended_attribute_t *pyfsxfs_extended_attribute,
PyObject *arguments,
PyObject *keywords )
{
PyObject *sequence_object = NULL;
static char *keyword_list[] = { "extent_index", NULL };
int extent_index = 0;
if( PyArg_ParseTupleAndKeywords(
arguments,
keywords,
"i",
keyword_list,
&extent_index ) == 0 )
{
return( NULL );
}
sequence_object = pyfsxfs_extended_attribute_get_extent_by_index(
pyfsxfs_extended_attribute,
extent_index );
return( sequence_object );
}

@@ -92,2 +92,15 @@ /*

PyObject *pyfsxfs_extended_attribute_get_number_of_extents(
pyfsxfs_extended_attribute_t *pyfsxfs_extended_attribute,
PyObject *arguments );
PyObject *pyfsxfs_extended_attribute_get_extent_by_index(
pyfsxfs_extended_attribute_t *pyfsxfs_extended_attribute,
int extent_index );
PyObject *pyfsxfs_extended_attribute_get_extent(
pyfsxfs_extended_attribute_t *pyfsxfs_extended_attribute,
PyObject *arguments,
PyObject *keywords );
#if defined( __cplusplus )

@@ -94,0 +107,0 @@ }

#!/usr/bin/env python
#
# Script to build and install Python-bindings.
# Version: 20211115
# Version: 20220806

@@ -326,2 +326,3 @@ from __future__ import print_function

long_description=project_information.package_description,
long_description_content_type="text/plain",
author="Joachim Metz",

@@ -328,0 +329,0 @@ author_email="joachim.metz@gmail.com",

#!/bin/bash
# Bash functions to run an executable for testing.
#
# Version: 20201215
# Version: 20220807
#

@@ -17,2 +17,4 @@ # When CHECK_WITH_ASAN is set to a non-empty value the test executable

# is run with valgrind, otherwise it is run without.
#
# PYTHON and PYTHON_VERSION are used to determine the Python interpreter.

@@ -446,3 +448,3 @@ EXIT_SUCCESS=0;

if test ${IS_PYTHON_SCRIPT} -eq 0;
if test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON};
then

@@ -767,3 +769,3 @@ local PYTHON=`which python${PYTHON_VERSION} 2> /dev/null`;

if test ${IS_PYTHON_SCRIPT} -eq 0;
if test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON};
then

@@ -770,0 +772,0 @@ local PYTHON=`which python${PYTHON_VERSION} 2> /dev/null`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display