mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-15 12:55:03 +08:00
ChangeLog, e2fsck.h, pass1.c, super.c:
pass1.c (process_inode_cmp): Use EXT2_QSORT_TYPE to define the appropriate return type for comparison functions for qsort. e2fsck.h: Add #ifdef protection for unistd.h super.c: Remove header files already included by e2fsck.h ChangeLog, dblist.c, ext2fs.h: ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the return type for comparison functions for qsort. dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function declaration. ChangeLog, extent.c: extent.c (ext2fs_create_extent_table): Use ext2fs_free_mem instead of free(). (extent_cmp): Use EXT2_QSORT_TYPE to define the appropriate return type for comparison functions for qsort.
This commit is contained in:
parent
76f875daa1
commit
4c77fe50d9
@ -1,3 +1,12 @@
|
||||
1998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
||||
|
||||
* pass1.c (process_inode_cmp): Use EXT2_QSORT_TYPE to define the
|
||||
appropriate return type for comparison functions for qsort.
|
||||
|
||||
* e2fsck.h: Add #ifdef protection for unistd.h
|
||||
|
||||
* super.c: Remove header files already included by e2fsck.h
|
||||
|
||||
1998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
||||
|
||||
* dirinfo.c (e2fsck_add_dir_info): Update function to pass the old
|
||||
|
@ -8,7 +8,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
|
@ -62,7 +62,7 @@ static void alloc_bad_map(e2fsck_t ctx);
|
||||
static void alloc_bb_map(e2fsck_t ctx);
|
||||
static void handle_fs_bad_blocks(e2fsck_t ctx);
|
||||
static void process_inodes(e2fsck_t ctx, char *block_buf);
|
||||
static int process_inode_cmp(const void *a, const void *b);
|
||||
static EXT2_QSORT_TYPE process_inode_cmp(const void *a, const void *b);
|
||||
static errcode_t scan_callback(ext2_filsys fs, ext2_inode_scan scan,
|
||||
dgrp_t group, void * priv_data);
|
||||
/* static char *describe_illegal_block(ext2_filsys fs, blk_t block); */
|
||||
@ -592,7 +592,7 @@ static void process_inodes(e2fsck_t ctx, char *block_buf)
|
||||
ehandler_operation(old_operation);
|
||||
}
|
||||
|
||||
static int process_inode_cmp(const void *a, const void *b)
|
||||
static EXT2_QSORT_TYPE process_inode_cmp(const void *a, const void *b)
|
||||
{
|
||||
const struct process_inode_block *ib_a =
|
||||
(const struct process_inode_block *) a;
|
||||
|
@ -9,22 +9,9 @@
|
||||
* %End-Header%
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#ifdef HAVE_MNTENT_H
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
|
||||
#ifndef EXT2_SKIP_UUID
|
||||
#include "uuid/uuid.h"
|
||||
|
@ -1,3 +1,11 @@
|
||||
1998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
||||
|
||||
* ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the
|
||||
return type for comparison functions for qsort.
|
||||
|
||||
* dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function
|
||||
declaration.
|
||||
|
||||
1998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
||||
|
||||
* ext2fs.h, bitops.h: Add support for the Watcom C compiler to do
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "ext2fsP.h"
|
||||
|
||||
static int dir_block_cmp(const void *a, const void *b);
|
||||
static EXT2_QSORT_TYPE dir_block_cmp(const void *a, const void *b);
|
||||
|
||||
/*
|
||||
* Returns the number of directories in the filesystem as reported by
|
||||
@ -234,7 +234,7 @@ errcode_t ext2fs_dblist_iterate(ext2_dblist dblist,
|
||||
}
|
||||
|
||||
|
||||
static int dir_block_cmp(const void *a, const void *b)
|
||||
static EXT2_QSORT_TYPE dir_block_cmp(const void *a, const void *b)
|
||||
{
|
||||
const struct ext2_db_entry *db_a =
|
||||
(const struct ext2_db_entry *) a;
|
||||
|
@ -66,6 +66,15 @@ typedef __s64 blkcnt_t;
|
||||
#include "ext2fs/ext2_err.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Portability help for Microsoft Visual C++
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#define EXT2_QSORT_TYPE int __cdecl
|
||||
#else
|
||||
#define EXT2_QSORT_TYPE int
|
||||
#endif
|
||||
|
||||
typedef struct struct_ext2_filsys *ext2_filsys;
|
||||
|
||||
struct ext2fs_struct_generic_bitmap {
|
||||
|
@ -1,3 +1,10 @@
|
||||
1998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
||||
|
||||
* extent.c (ext2fs_create_extent_table): Use ext2fs_free_mem
|
||||
instead of free().
|
||||
(extent_cmp): Use EXT2_QSORT_TYPE to define the appropriate
|
||||
return type for comparison functions for qsort.
|
||||
|
||||
1998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
||||
|
||||
* resize2fs.c (adjust_superblock):
|
||||
|
@ -49,7 +49,7 @@ errcode_t ext2fs_create_extent_table(ext2_extent *ret_extent, int size)
|
||||
retval = ext2fs_get_mem(sizeof(struct ext2_extent_entry) *
|
||||
extent->size, (void **) &extent->list);
|
||||
if (retval) {
|
||||
free(extent);
|
||||
ext2fs_free_mem((void **) &extent);
|
||||
return retval;
|
||||
}
|
||||
memset(extent->list, 0,
|
||||
@ -121,7 +121,7 @@ errcode_t ext2fs_add_extent_entry(ext2_extent extent, __u32 old_loc, __u32 new_l
|
||||
/*
|
||||
* Helper function for qsort
|
||||
*/
|
||||
static int extent_cmp(const void *a, const void *b)
|
||||
static EXT2_QSORT_TYPE extent_cmp(const void *a, const void *b)
|
||||
{
|
||||
const struct ext2_extent_entry *db_a;
|
||||
const struct ext2_extent_entry *db_b;
|
||||
|
Loading…
Reference in New Issue
Block a user