mirror of https://github.com/vitalif/e2fsprogs
Merge branch 'maint' into next
Conflicts: debian/changelog e2fsck/pass1.c lib/ext2fs/Makefile.incrypto
commit
f9f3050a0a
|
@ -11,6 +11,7 @@ Makefile
|
|||
*.diff
|
||||
*.dSYM
|
||||
*.o
|
||||
*.a
|
||||
*.orig
|
||||
*.patch
|
||||
*.pc
|
||||
|
@ -21,6 +22,7 @@ MCONFIG
|
|||
asm_types.h
|
||||
config.log
|
||||
config.status
|
||||
debugfs/extent_cmds.c
|
||||
debugfs/debug_cmds.c
|
||||
debugfs/debugfs
|
||||
debugfs/debugfs.8
|
||||
|
@ -51,6 +53,8 @@ e2fsck/tst_problem
|
|||
e2fsck/tst_refcount
|
||||
e2fsck/tst_region
|
||||
e2fsprogs.spec
|
||||
ext2ed/ext2ed.conf
|
||||
ext2ed/ext2ed.8
|
||||
intl/charset.alias
|
||||
intl/libgnuintl.h
|
||||
intl/libintl.a
|
||||
|
@ -61,7 +65,6 @@ lib/blkid/blkid.h
|
|||
lib/blkid/blkid.pc
|
||||
lib/blkid/blkid_types.h
|
||||
lib/blkid/libblkid.3
|
||||
lib/blkid/libblkid.a
|
||||
lib/blkid/subdirs
|
||||
lib/blkid/test_probe
|
||||
lib/blkid/tests/*.ok
|
||||
|
@ -81,13 +84,11 @@ lib/blkid/tst_types
|
|||
lib/config.h
|
||||
lib/dirpaths.h
|
||||
lib/e2p/e2p.pc
|
||||
lib/e2p/libe2p.a
|
||||
lib/e2p/subdirs
|
||||
lib/e2p/tst_feature
|
||||
lib/e2p/tst_ostype
|
||||
lib/et/com_err.pc
|
||||
lib/et/compile_et
|
||||
lib/et/libcom_err.a
|
||||
lib/et/subdirs
|
||||
lib/ext2fs/crc32c_table.h
|
||||
lib/ext2fs/debug_cmds.c
|
||||
|
@ -98,7 +99,6 @@ lib/ext2fs/ext2_types.h
|
|||
lib/ext2fs/ext2fs.pc
|
||||
lib/ext2fs/extent_cmds.c
|
||||
lib/ext2fs/gen_crc32ctable
|
||||
lib/ext2fs/libext2fs.a
|
||||
lib/ext2fs/subdirs
|
||||
lib/ext2fs/tst_badblocks
|
||||
lib/ext2fs/tst_bitmaps
|
||||
|
@ -115,16 +115,7 @@ lib/ext2fs/tst_iscan
|
|||
lib/ext2fs/tst_libext2fs
|
||||
lib/ext2fs/tst_super_size
|
||||
lib/ext2fs/tst_types
|
||||
lib/libblkid.a
|
||||
lib/libcom_err.a
|
||||
lib/libe2p.a
|
||||
lib/libext2fs.a
|
||||
lib/libquota.a
|
||||
lib/libss.a
|
||||
lib/libuuid.a
|
||||
lib/quota/libquota.a
|
||||
lib/quota/subdirs
|
||||
lib/ss/libss.a
|
||||
lib/ss/mk_cmds
|
||||
lib/ss/ss.pc
|
||||
lib/ss/ss_err.c
|
||||
|
@ -135,7 +126,6 @@ lib/ss/test.diff
|
|||
lib/ss/test_cmd.c
|
||||
lib/ss/test_out
|
||||
lib/ss/test_ss
|
||||
lib/uuid/libuuid.a
|
||||
lib/uuid/subdirs
|
||||
lib/uuid/tst_uuid
|
||||
lib/uuid/uuid.3
|
||||
|
|
|
@ -4,6 +4,16 @@ e2fsprogs (1.43~WIP-2014-02-04-1) unstable; urgency=low
|
|||
|
||||
-- Theodore Y. Ts'o <tytso@mit.edu> Wed, 04 Feb 2014 23:31:56 -0500
|
||||
|
||||
e2fsprogs (1.42.11-2) unstable; urgency=low
|
||||
|
||||
* Don't try to build lib/ext2fs/tst_ext2fs unless running "make
|
||||
check"; this fixes a MIPS FTBFS problem because mips has a special
|
||||
no-pics build needed for bootloaders where we only build libext2fs
|
||||
but not libss or other libraries (Closes: #754605)
|
||||
* Update French translation
|
||||
|
||||
-- Theodore Y. Ts'o <tytso@mit.edu> Sun, 13 Jul 2014 16:18:27 -0500
|
||||
|
||||
e2fsprogs (1.42.11-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
|
|
@ -188,7 +188,7 @@ request do_zap_block, "Zap block: fill with 0, pattern, flip bits etc.",
|
|||
zap_block, zap;
|
||||
|
||||
request do_block_dump, "Dump contents of a block",
|
||||
block_dump, bd;
|
||||
block_dump, bdump, bd;
|
||||
|
||||
request do_list_xattr, "List extended attributes of an inode",
|
||||
ea_list;
|
||||
|
@ -208,5 +208,9 @@ request do_list_quota, "List quota",
|
|||
request do_get_quota, "Get quota",
|
||||
get_quota, gq;
|
||||
|
||||
request do_idump, "Dump the inode structure in hex",
|
||||
inode_dump, idump, id;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
|
|
|
@ -351,6 +351,9 @@ showing its tree structure.
|
|||
Print a listing of the inodes which use the one or more blocks specified
|
||||
on the command line.
|
||||
.TP
|
||||
.BI inode_dump " filespec"
|
||||
Print the contents of the inode data structure in hex and ASCII format.
|
||||
.TP
|
||||
.BI imap " filespec"
|
||||
Print the location of the inode data structure (in the inode table)
|
||||
of the inode
|
||||
|
|
|
@ -1883,6 +1883,39 @@ void do_imap(int argc, char *argv[])
|
|||
|
||||
}
|
||||
|
||||
void do_idump(int argc, char *argv[])
|
||||
{
|
||||
ext2_ino_t ino;
|
||||
char *buf;
|
||||
errcode_t err;
|
||||
int isize;
|
||||
|
||||
if (common_args_process(argc, argv, 2, 2, argv[0],
|
||||
"<file>", 0))
|
||||
return;
|
||||
ino = string_to_inode(argv[1]);
|
||||
if (!ino)
|
||||
return;
|
||||
|
||||
isize = EXT2_INODE_SIZE(current_fs->super);
|
||||
err = ext2fs_get_mem(isize, &buf);
|
||||
if (err) {
|
||||
com_err(argv[0], err, "while allocating memory");
|
||||
return;
|
||||
}
|
||||
|
||||
err = ext2fs_read_inode_full(current_fs, ino,
|
||||
(struct ext2_inode *)buf, isize);
|
||||
if (err) {
|
||||
com_err(argv[0], err, "while reading inode %d", ino);
|
||||
goto err;
|
||||
}
|
||||
|
||||
do_byte_hexdump(stdout, buf, isize);
|
||||
err:
|
||||
ext2fs_free_mem(&buf);
|
||||
}
|
||||
|
||||
#ifndef READ_ONLY
|
||||
void do_set_current_time(int argc, char *argv[])
|
||||
{
|
||||
|
|
|
@ -191,3 +191,4 @@ void do_list_xattr(int argc, char **argv);
|
|||
/* zap.c */
|
||||
extern void do_zap_block(int argc, char **argv);
|
||||
extern void do_block_dump(int argc, char **argv);
|
||||
extern void do_byte_hexdump(FILE *fp, unsigned char *buf, size_t bufsize);
|
||||
|
|
|
@ -556,8 +556,9 @@ static errcode_t parse_bmap(struct field_set_info *info,
|
|||
}
|
||||
|
||||
retval = ext2fs_bmap2(current_fs, set_ino,
|
||||
(struct ext2_inode *) &set_inode,
|
||||
NULL, BMAP_SET, array_idx, NULL, &blk);
|
||||
(struct ext2_inode *) &set_inode,
|
||||
NULL, BMAP_ALLOC | BMAP_SET, array_idx, NULL,
|
||||
&blk);
|
||||
if (retval) {
|
||||
com_err("set_inode", retval, "while setting block map");
|
||||
}
|
||||
|
|
|
@ -176,7 +176,6 @@ void do_block_dump(int argc, char *argv[])
|
|||
char *file = NULL;
|
||||
unsigned int i, j;
|
||||
int c, err;
|
||||
int suppress = -1;
|
||||
|
||||
if (check_fs_open(argv[0]))
|
||||
return;
|
||||
|
@ -229,11 +228,21 @@ void do_block_dump(int argc, char *argv[])
|
|||
goto errout;
|
||||
}
|
||||
|
||||
for (i=0; i < current_fs->blocksize; i += 16) {
|
||||
do_byte_hexdump(stdout, buf, current_fs->blocksize);
|
||||
errout:
|
||||
free(buf);
|
||||
}
|
||||
|
||||
void do_byte_hexdump(FILE *fp, unsigned char *buf, size_t bufsize)
|
||||
{
|
||||
size_t i, j;
|
||||
int suppress = -1;
|
||||
|
||||
for (i = 0; i < bufsize; i += 16) {
|
||||
if (suppress < 0) {
|
||||
if (i && memcmp(buf + i, buf + i - 16, 16) == 0) {
|
||||
suppress = i;
|
||||
printf("*\n");
|
||||
fprintf(fp, "*\n");
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
@ -241,20 +250,16 @@ void do_block_dump(int argc, char *argv[])
|
|||
continue;
|
||||
suppress = -1;
|
||||
}
|
||||
printf("%04o ", i);
|
||||
fprintf(fp, "%04o ", (unsigned int)i);
|
||||
for (j = 0; j < 16; j++) {
|
||||
printf("%02x", buf[i+j]);
|
||||
fprintf(fp, "%02x", buf[i+j]);
|
||||
if ((j % 2) == 1)
|
||||
putchar(' ');
|
||||
fprintf(fp, " ");
|
||||
}
|
||||
putchar(' ');
|
||||
fprintf(fp, " ");
|
||||
for (j = 0; j < 16; j++)
|
||||
printf("%c", isprint(buf[i+j]) ? buf[i+j] : '.');
|
||||
putchar('\n');
|
||||
fprintf(fp, "%c", isprint(buf[i+j]) ? buf[i+j] : '.');
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
putchar('\n');
|
||||
|
||||
errout:
|
||||
free(buf);
|
||||
return;
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
|
|
@ -80,7 +80,8 @@ static void adjust_extattr_refcount(e2fsck_t ctx, ext2_refcount_t refcount,
|
|||
struct process_block_struct {
|
||||
ext2_ino_t ino;
|
||||
unsigned is_dir:1, is_reg:1, clear:1, suppress:1,
|
||||
fragmented:1, compressed:1, bbcheck:1;
|
||||
fragmented:1, compressed:1, bbcheck:1,
|
||||
inode_modified:1;
|
||||
blk64_t num_blocks;
|
||||
blk64_t max_blocks;
|
||||
e2_blkcnt_t last_block;
|
||||
|
@ -1968,8 +1969,10 @@ static void scan_extent_node(e2fsck_t ctx, struct problem_context *pctx,
|
|||
pctx->num = extent.e_len;
|
||||
problem = 0;
|
||||
if (fix_problem(ctx, PR_1_EXTENT_ONLY_CSUM_INVALID,
|
||||
pctx))
|
||||
pctx)) {
|
||||
pb->inode_modified = 1;
|
||||
ext2fs_extent_replace(ehandle, 0, &extent);
|
||||
}
|
||||
}
|
||||
|
||||
if (problem) {
|
||||
|
@ -1980,14 +1983,40 @@ report_problem:
|
|||
pctx->blkcount = extent.e_lblk + extent.e_len;
|
||||
if (fix_problem(ctx, problem, pctx)) {
|
||||
fix_problem_now:
|
||||
if (ctx->invalid_bitmaps) {
|
||||
/*
|
||||
* If fsck knows the bitmaps are bad,
|
||||
* skip to the next extent and
|
||||
* try to clear this extent again
|
||||
* after fixing the bitmaps, by
|
||||
* restarting fsck.
|
||||
*/
|
||||
pctx->errcode = ext2fs_extent_get(
|
||||
ehandle,
|
||||
EXT2_EXTENT_NEXT_SIB,
|
||||
&extent);
|
||||
ctx->flags |= E2F_FLAG_RESTART_LATER;
|
||||
if (pctx->errcode ==
|
||||
EXT2_ET_NO_CURRENT_NODE) {
|
||||
pctx->errcode = 0;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
e2fsck_read_bitmaps(ctx);
|
||||
pb->inode_modified = 1;
|
||||
pctx->errcode =
|
||||
ext2fs_extent_delete(ehandle, 0);
|
||||
if (pctx->errcode) {
|
||||
pctx->str = "ext2fs_extent_delete";
|
||||
return;
|
||||
}
|
||||
ext2fs_extent_fix_parents(ehandle);
|
||||
pctx->errcode = ext2fs_extent_fix_parents(ehandle);
|
||||
if (pctx->errcode &&
|
||||
pctx->errcode != EXT2_ET_NO_CURRENT_NODE) {
|
||||
pctx->str = "ext2fs_extent_fix_parents";
|
||||
return;
|
||||
}
|
||||
pctx->errcode = ext2fs_extent_get(ehandle,
|
||||
EXT2_EXTENT_CURRENT,
|
||||
&extent);
|
||||
|
@ -2026,10 +2055,13 @@ fix_problem_now:
|
|||
pctx->num = e_info.curr_level - 1;
|
||||
problem = PR_1_EXTENT_INDEX_START_INVALID;
|
||||
if (fix_problem(ctx, problem, pctx)) {
|
||||
pb->inode_modified = 1;
|
||||
pctx->errcode =
|
||||
ext2fs_extent_fix_parents(ehandle);
|
||||
if (pctx->errcode)
|
||||
if (pctx->errcode) {
|
||||
pctx->str = "ext2fs_extent_fix_parents";
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
scan_extent_node(ctx, pctx, pb, extent.e_lblk,
|
||||
|
@ -2223,6 +2255,7 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
|
|||
pb.inode = inode;
|
||||
pb.pctx = pctx;
|
||||
pb.ctx = ctx;
|
||||
pb.inode_modified = 0;
|
||||
pctx->ino = ino;
|
||||
pctx->errcode = 0;
|
||||
|
||||
|
@ -2254,6 +2287,16 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
|
|||
if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL))
|
||||
check_blocks_extents(ctx, pctx, &pb);
|
||||
else {
|
||||
/*
|
||||
* If we've modified the inode, write it out before
|
||||
* iterate() tries to use it.
|
||||
*/
|
||||
if (dirty_inode) {
|
||||
e2fsck_write_inode(ctx, ino, inode,
|
||||
"check_blocks");
|
||||
dirty_inode = 0;
|
||||
}
|
||||
fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
|
||||
pctx->errcode = ext2fs_block_iterate3(fs, ino,
|
||||
pb.is_dir ? BLOCK_FLAG_HOLE : 0,
|
||||
block_buf, process_block, &pb);
|
||||
|
@ -2262,6 +2305,16 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
|
|||
* files.
|
||||
*/
|
||||
pb.last_init_lblock = pb.last_block;
|
||||
/*
|
||||
* If iterate() changed a block mapping, we have to
|
||||
* re-read the inode. If we decide to clear the
|
||||
* inode after clearing some stuff, we'll re-write the
|
||||
* bad mappings into the inode!
|
||||
*/
|
||||
if (pb.inode_modified)
|
||||
e2fsck_read_inode(ctx, ino, inode,
|
||||
"check_blocks");
|
||||
fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
|
||||
}
|
||||
} else {
|
||||
/* check inline data */
|
||||
|
@ -2561,6 +2614,7 @@ static int process_block(ext2_filsys fs,
|
|||
if (fix_problem(ctx, problem, pctx)) {
|
||||
blk = *block_nr = 0;
|
||||
ret_code = BLOCK_CHANGED;
|
||||
p->inode_modified = 1;
|
||||
goto mark_dir;
|
||||
} else
|
||||
return 0;
|
||||
|
|
|
@ -301,6 +301,7 @@ static void pass1b(e2fsck_t ctx, char *block_buf)
|
|||
if (pctx.errcode == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE)
|
||||
continue;
|
||||
if (pctx.errcode) {
|
||||
pctx.ino = ino;
|
||||
fix_problem(ctx, PR_1B_ISCAN_ERROR, &pctx);
|
||||
ctx->flags |= E2F_FLAG_ABORT;
|
||||
return;
|
||||
|
|
|
@ -1642,7 +1642,8 @@ print_unsupp_features:
|
|||
run_result = e2fsck_run(ctx);
|
||||
e2fsck_clear_progbar(ctx);
|
||||
|
||||
if (ctx->flags & E2F_FLAG_JOURNAL_INODE) {
|
||||
if (!ctx->invalid_bitmaps &&
|
||||
(ctx->flags & E2F_FLAG_JOURNAL_INODE)) {
|
||||
if (fix_problem(ctx, PR_6_RECREATE_JOURNAL, &pctx)) {
|
||||
if (journal_size < 1024)
|
||||
journal_size = ext2fs_default_journal_size(ext2fs_blocks_count(fs->super));
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#define my_llseek lseek64
|
||||
|
||||
#elif defined(HAVE_LLSEEK)
|
||||
#include <syscall.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifndef HAVE_LLSEEK_PROTOTYPE
|
||||
extern long long llseek(int fd, long long offset, int origin);
|
||||
|
|
|
@ -226,7 +226,7 @@ BSDLIB_INSTALL_DIR = $(root_libdir)
|
|||
@MAKEFILE_BSDLIB@
|
||||
@MAKEFILE_PROFILE@
|
||||
|
||||
all:: ext2fs.pc tst_libext2fs
|
||||
all:: ext2fs.pc
|
||||
|
||||
.c.o:
|
||||
$(E) " CC $<"
|
||||
|
@ -409,7 +409,7 @@ filefrag.o: $(top_srcdir)/debugfs/filefrag.c
|
|||
|
||||
tst_libext2fs.o: $(srcdir)/tst_libext2fs.c
|
||||
$(E) " CC $<"
|
||||
$(Q) $(CC) $(ALL_CFLAGS) $(DEPEND_CFLAGS) -c $< -o $@
|
||||
$(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(DEPEND_CFLAGS) -c $< -o $@
|
||||
|
||||
tst_bitmaps_cmd.c: tst_bitmaps_cmd.ct
|
||||
$(E) " MK_CMDS $@"
|
||||
|
@ -420,32 +420,33 @@ tst_bitmaps: tst_bitmaps.o tst_bitmaps_cmd.o $(srcdir)/blkmap64_rb.c \
|
|||
$(E) " LD $@"
|
||||
$(Q) $(CC) -o $@ tst_bitmaps.o tst_bitmaps_cmd.o \
|
||||
-DDEBUG_RB $(srcdir)/blkmap64_rb.c $(ALL_CFLAGS) \
|
||||
$(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) \
|
||||
$(SYSLIBS)
|
||||
$(ALL_LDFLAGS) $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) \
|
||||
$(STATIC_LIBCOM_ERR) $(SYSLIBS)
|
||||
|
||||
tst_extents: $(srcdir)/extent.c $(DEBUG_OBJS) $(DEPSTATIC_LIBSS) libext2fs.a \
|
||||
$(STATIC_LIBE2P) $(DEPLIBUUID) $(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR) \
|
||||
$(DEPLIBQUOTA)
|
||||
$(E) " LD $@"
|
||||
$(Q) $(CC) -o tst_extents $(srcdir)/extent.c \
|
||||
$(ALL_CFLAGS) -DDEBUG $(DEBUG_OBJS) $(STATIC_LIBSS) \
|
||||
$(STATIC_LIBE2P) $(LIBQUOTA) $(STATIC_LIBEXT2FS) \
|
||||
$(LIBBLKID) $(LIBUUID) $(STATIC_LIBCOM_ERR) \
|
||||
$(SYSLIBS) -I $(top_srcdir)/debugfs
|
||||
$(ALL_CFLAGS) $(ALL_LDFLAGS) -DDEBUG $(DEBUG_OBJS) \
|
||||
$(STATIC_LIBSS) $(STATIC_LIBE2P) $(LIBQUOTA) \
|
||||
$(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) \
|
||||
$(STATIC_LIBCOM_ERR) $(SYSLIBS) -I $(top_srcdir)/debugfs
|
||||
|
||||
tst_libext2fs: $(DEBUG_OBJS) \
|
||||
$(DEPSTATIC_LIBSS) $(STATIC_LIBE2P) $(DEPLIBUUID) libext2fs.a \
|
||||
$(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR) $(DEPLIBQUOTA)
|
||||
$(E) " LD $@"
|
||||
$(Q) $(CC) -o tst_libext2fs $(ALL_CFLAGS) -DDEBUG $(DEBUG_OBJS) \
|
||||
$(Q) $(CC) -o tst_libext2fs $(ALL_LDFLAGS) -DDEBUG $(DEBUG_OBJS) \
|
||||
$(STATIC_LIBSS) $(STATIC_LIBE2P) $(LIBQUOTA) \
|
||||
$(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) \
|
||||
$(STATIC_LIBCOM_ERR) $(SYSLIBS) -I $(top_srcdir)/debugfs
|
||||
|
||||
tst_inline: $(srcdir)/inline.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
|
||||
$(E) " LD $@"
|
||||
$(Q) $(CC) -o tst_inline $(srcdir)/inline.c $(ALL_CFLAGS) -DDEBUG \
|
||||
$(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
|
||||
$(Q) $(CC) -o tst_inline $(srcdir)/inline.c $(ALL_CFLAGS) \
|
||||
$(ALL_LDFLAGS) -DDEBUG $(STATIC_LIBEXT2FS) \
|
||||
$(STATIC_LIBCOM_ERR) $(SYSLIBS)
|
||||
|
||||
tst_inline_data: inline_data.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
|
||||
$(E) " LD $@"
|
||||
|
@ -456,11 +457,11 @@ tst_csum: csum.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(STATIC_LIBE2P) \
|
|||
$(top_srcdir)/lib/e2p/e2p.h
|
||||
$(E) " LD $@"
|
||||
$(Q) $(CC) -o tst_csum $(srcdir)/csum.c -DDEBUG \
|
||||
$(ALL_CFLAGS) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
|
||||
$(STATIC_LIBE2P) $(SYSLIBS)
|
||||
$(ALL_CFLAGS) $(ALL_LDFLAGS) $(STATIC_LIBEXT2FS) \
|
||||
$(STATIC_LIBCOM_ERR) $(STATIC_LIBE2P) $(SYSLIBS)
|
||||
|
||||
tst_crc32c: $(srcdir)/crc32c.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
|
||||
$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32c $(srcdir)/crc32c.c \
|
||||
$(Q) $(CC) $(ALL_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32c $(srcdir)/crc32c.c \
|
||||
-DUNITTEST $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
|
||||
$(SYSLIBS)
|
||||
|
||||
|
@ -471,7 +472,7 @@ mkjournal: mkjournal.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
|
|||
|
||||
check:: tst_bitops tst_badblocks tst_iscan tst_types tst_icount \
|
||||
tst_super_size tst_types tst_inode_size tst_csum tst_crc32c tst_bitmaps \
|
||||
tst_inline tst_inline_data
|
||||
tst_inline tst_inline_data tst_libext2fs
|
||||
LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_bitops
|
||||
LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_badblocks
|
||||
LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_iscan
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#else
|
||||
#if defined(HAVE_LLSEEK)
|
||||
#include <syscall.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifndef HAVE_LLSEEK_PROTOTYPE
|
||||
extern long long llseek (int fd, long long offset, int origin);
|
||||
|
|
|
@ -888,7 +888,9 @@ static int get_physical_count(struct fiemap_extent_list *physical_list_head)
|
|||
|
||||
do {
|
||||
if ((ext_list_tmp->data.physical + ext_list_tmp->data.len)
|
||||
!= ext_list_tmp->next->data.physical) {
|
||||
!= ext_list_tmp->next->data.physical ||
|
||||
(ext_list_tmp->data.logical + ext_list_tmp->data.len)
|
||||
!= ext_list_tmp->next->data.logical) {
|
||||
/* This extent and next extent are not continuous. */
|
||||
ret++;
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ static blk64_t get_partition_start(const char *device_name)
|
|||
cp = search_sysfs_block(st.st_rdev, path);
|
||||
if (!cp)
|
||||
return 0;
|
||||
strncat(path, "/start", SYSFS_PATH_LEN);
|
||||
strncat(path, "/start", SYSFS_PATH_LEN-1);
|
||||
f = fopen(path, "r");
|
||||
if (!f)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue