diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
commit | 857a92991db30f538ea8858a2dfda0fe606353e3 (patch) | |
tree | dcf97aa3a41925c05670bb640cdd495fc1083f72 /tests/progs | |
parent | Adding debian version 1.47.0-2.4. (diff) | |
download | e2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.tar.xz e2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.zip |
Merging upstream version 1.47.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/progs/Makefile.in | 12 | ||||
-rw-r--r-- | tests/progs/test_icount.c | 18 | ||||
-rw-r--r-- | tests/progs/test_icount.h | 29 | ||||
-rw-r--r-- | tests/progs/test_rel.c | 44 | ||||
-rw-r--r-- | tests/progs/test_rel.h | 44 |
5 files changed, 84 insertions, 63 deletions
diff --git a/tests/progs/Makefile.in b/tests/progs/Makefile.in index e1325c6..1a8e929 100644 --- a/tests/progs/Makefile.in +++ b/tests/progs/Makefile.in @@ -20,7 +20,8 @@ TEST_REL_OBJS= test_rel.o test_rel_cmds.o TEST_ICOUNT_OBJS= test_icount.o test_icount_cmds.o -SRCS= $(srcdir)/test_rel.c +SRCS= $(srcdir)/test_icount.c \ + $(srcdir)/test_rel.c LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS) DEPLIBS= $(LIBEXT2FS) $(DEPLIBSS) $(DEPLIBCOM_ERR) @@ -72,6 +73,15 @@ distclean: clean # Makefile dependencies follow. This must be the last section in # the Makefile.in file # +test_icount.o: $(srcdir)/test_icount.c $(top_builddir)/lib/config.h \ + $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ + $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \ + $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \ + $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ + $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ + $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \ + $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/irel.h \ + $(top_srcdir)/lib/ext2fs/brel.h $(srcdir)/test_icount.h test_rel.o: $(srcdir)/test_rel.c $(top_builddir)/lib/config.h \ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \ diff --git a/tests/progs/test_icount.c b/tests/progs/test_icount.c index 6ebb100..c1005c6 100644 --- a/tests/progs/test_icount.c +++ b/tests/progs/test_icount.c @@ -61,7 +61,7 @@ static int parse_inode(const char *request, const char *desc, return 0; } -void do_create_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_create_icount(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -92,7 +92,7 @@ void do_create_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), } } -void do_free_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_free_icount(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { if (argc != 1) { @@ -106,7 +106,7 @@ void do_free_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), test_icount = 0; } -void do_fetch(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_fetch(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -129,7 +129,7 @@ void do_fetch(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Count is %u\n", count); } -void do_increment(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_increment(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -153,7 +153,7 @@ void do_increment(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Count is now %u\n", count); } -void do_decrement(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_decrement(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -177,7 +177,7 @@ void do_decrement(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Count is now %u\n", count); } -void do_store(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_store(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -206,7 +206,7 @@ void do_store(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), } } -void do_dump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_dump(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -231,7 +231,7 @@ void do_dump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), } } -void do_validate(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_validate(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -250,7 +250,7 @@ void do_validate(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Icount structure successfully validated\n"); } -void do_get_size(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_get_size(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { ext2_ino_t size; diff --git a/tests/progs/test_icount.h b/tests/progs/test_icount.h index 29d56ab..b086547 100644 --- a/tests/progs/test_icount.h +++ b/tests/progs/test_icount.h @@ -1,10 +1,21 @@ -void do_create_icount(int argc, char **argv, int sci_idx, void *infop); -void do_free_icount(int argc, char **argv, int sci_idx, void *infop); -void do_fetch(int argc, char **argv, int sci_idx, void *infop); -void do_increment(int argc, char **argv, int sci_idx, void *infop); -void do_decrement(int argc, char **argv, int sci_idx, void *infop); -void do_store(int argc, char **argv, int sci_idx, void *infop); -void do_get_size(int argc, char **argv, int sci_idx, void *infop); -void do_dump(int argc, char **argv, int sci_idx, void *infop); -void do_validate(int argc, char **argv, int sci_idx, void *infop); +/* + * test_icount.h + * + * Copyright (C) 1997 Theodore Ts'o. + * + * %Begin-Header% + * This file may be redistributed under the terms of the GNU Public + * License. + * %End-Header% + */ + +void do_create_icount(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_free_icount(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_fetch(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_increment(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_decrement(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_store(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_get_size(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_dump(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_validate(int argc, ss_argv_t argv, int sci_idx, void *infop); diff --git a/tests/progs/test_rel.c b/tests/progs/test_rel.c index 8f7280c..6666b73 100644 --- a/tests/progs/test_rel.c +++ b/tests/progs/test_rel.c @@ -141,7 +141,7 @@ static void display_irel_entry(ext2_ino_t old, /* * These are the actual command table procedures */ -void do_brel_ma_create(int argc, char **argv) +void do_brel_ma_create(int argc, ss_argv_t argv) { const char *usage = "Usage: %s name max_blocks\n"; errcode_t retval; @@ -161,7 +161,7 @@ void do_brel_ma_create(int argc, char **argv) return; } -void do_brel_free(int argc, char **argv) +void do_brel_free(int argc, ss_argv_t argv) { if (check_brel(argv[0])) return; @@ -170,7 +170,7 @@ void do_brel_free(int argc, char **argv) return; } -void do_brel_put(int argc, char **argv) +void do_brel_put(int argc, ss_argv_t argv) { const char *usage = "usage: %s old_block new_block [owner] [offset]"; errcode_t retval; @@ -211,7 +211,7 @@ void do_brel_put(int argc, char **argv) return; } -void do_brel_get(int argc, char **argv) +void do_brel_get(int argc, ss_argv_t argv) { const char *usage = "%s block"; errcode_t retval; @@ -235,7 +235,7 @@ void do_brel_get(int argc, char **argv) return; } -void do_brel_start_iter(int argc, char **argv) +void do_brel_start_iter(int argc, ss_argv_t argv) { errcode_t retval; @@ -250,7 +250,7 @@ void do_brel_start_iter(int argc, char **argv) return; } -void do_brel_next(int argc, char **argv) +void do_brel_next(int argc, ss_argv_t argv) { errcode_t retval; struct ext2_block_relocate_entry ent; @@ -272,7 +272,7 @@ void do_brel_next(int argc, char **argv) return; } -void do_brel_dump(int argc, char **argv) +void do_brel_dump(int argc, ss_argv_t argv) { errcode_t retval; struct ext2_block_relocate_entry ent; @@ -301,7 +301,7 @@ void do_brel_dump(int argc, char **argv) return; } -void do_brel_move(int argc, char **argv) +void do_brel_move(int argc, ss_argv_t argv) { const char *usage = "%s old_block new_block"; errcode_t retval; @@ -326,7 +326,7 @@ void do_brel_move(int argc, char **argv) return; } -void do_brel_delete(int argc, char **argv) +void do_brel_delete(int argc, ss_argv_t argv) { const char *usage = "%s block"; errcode_t retval; @@ -348,7 +348,7 @@ void do_brel_delete(int argc, char **argv) } } -void do_irel_ma_create(int argc, char **argv) +void do_irel_ma_create(int argc, ss_argv_t argv) { const char *usage = "Usage: %s name max_inode\n"; errcode_t retval; @@ -368,7 +368,7 @@ void do_irel_ma_create(int argc, char **argv) return; } -void do_irel_free(int argc, char **argv) +void do_irel_free(int argc, ss_argv_t argv) { if (check_irel(argv[0])) return; @@ -378,7 +378,7 @@ void do_irel_free(int argc, char **argv) return; } -void do_irel_put(int argc, char **argv) +void do_irel_put(int argc, ss_argv_t argv) { const char *usage = "%s old new max_refs"; errcode_t retval; @@ -414,7 +414,7 @@ void do_irel_put(int argc, char **argv) return; } -void do_irel_get(int argc, char **argv) +void do_irel_get(int argc, ss_argv_t argv) { const char *usage = "%s inode"; errcode_t retval; @@ -440,7 +440,7 @@ void do_irel_get(int argc, char **argv) return; } -void do_irel_get_by_orig(int argc, char **argv) +void do_irel_get_by_orig(int argc, ss_argv_t argv) { const char *usage = "%s orig_inode"; errcode_t retval; @@ -466,7 +466,7 @@ void do_irel_get_by_orig(int argc, char **argv) return; } -void do_irel_start_iter(int argc, char **argv) +void do_irel_start_iter(int argc, ss_argv_t argv) { errcode_t retval; @@ -481,7 +481,7 @@ void do_irel_start_iter(int argc, char **argv) return; } -void do_irel_next(int argc, char **argv) +void do_irel_next(int argc, ss_argv_t argv) { errcode_t retval; ext2_ino_t old; @@ -503,7 +503,7 @@ void do_irel_next(int argc, char **argv) return; } -void do_irel_dump(int argc, char **argv) +void do_irel_dump(int argc, ss_argv_t argv) { errcode_t retval; ext2_ino_t ino; @@ -532,7 +532,7 @@ void do_irel_dump(int argc, char **argv) return; } -void do_irel_add_ref(int argc, char **argv) +void do_irel_add_ref(int argc, ss_argv_t argv) { const char *usage = "%s inode block offset"; errcode_t retval; @@ -569,7 +569,7 @@ void do_irel_add_ref(int argc, char **argv) return; } -void do_irel_start_iter_ref(int argc, char **argv) +void do_irel_start_iter_ref(int argc, ss_argv_t argv) { const char *usage = "%s inode"; errcode_t retval; @@ -593,7 +593,7 @@ void do_irel_start_iter_ref(int argc, char **argv) return; } -void do_irel_next_ref(int argc, char **argv) +void do_irel_next_ref(int argc, ss_argv_t argv) { struct ext2_inode_reference ref; errcode_t retval; @@ -610,7 +610,7 @@ void do_irel_next_ref(int argc, char **argv) return; } -void do_irel_move(int argc, char **argv) +void do_irel_move(int argc, ss_argv_t argv) { const char *usage = "%s old new"; errcode_t retval; @@ -636,7 +636,7 @@ void do_irel_move(int argc, char **argv) return; } -void do_irel_delete(int argc, char **argv) +void do_irel_delete(int argc, ss_argv_t argv) { const char *usage = "%s inode"; errcode_t retval; diff --git a/tests/progs/test_rel.h b/tests/progs/test_rel.h index 47c4d09..62267ba 100644 --- a/tests/progs/test_rel.h +++ b/tests/progs/test_rel.h @@ -11,25 +11,25 @@ -void do_brel_ma_create(int argc, char **argv); -void do_brel_free(int argc, char **argv); -void do_brel_put(int argc, char **argv); -void do_brel_get(int argc, char **argv); -void do_brel_start_iter(int argc, char **argv); -void do_brel_next(int argc, char **argv); -void do_brel_dump(int argc, char **argv); -void do_brel_move(int argc, char **argv); -void do_brel_delete(int argc, char **argv); -void do_irel_ma_create(int argc, char **argv); -void do_irel_free(int argc, char **argv); -void do_irel_put(int argc, char **argv); -void do_irel_get(int argc, char **argv); -void do_irel_get_by_orig(int argc, char **argv); -void do_irel_start_iter(int argc, char **argv); -void do_irel_next(int argc, char **argv); -void do_irel_dump(int argc, char **argv); -void do_irel_add_ref(int argc, char **argv); -void do_irel_start_iter_ref(int argc, char **argv); -void do_irel_next_ref(int argc, char **argv); -void do_irel_move(int argc, char **argv); -void do_irel_delete(int argc, char **argv); +void do_brel_ma_create(int argc, ss_argv_t argv); +void do_brel_free(int argc, ss_argv_t argv); +void do_brel_put(int argc, ss_argv_t argv); +void do_brel_get(int argc, ss_argv_t argv); +void do_brel_start_iter(int argc, ss_argv_t argv); +void do_brel_next(int argc, ss_argv_t argv); +void do_brel_dump(int argc, ss_argv_t argv); +void do_brel_move(int argc, ss_argv_t argv); +void do_brel_delete(int argc, ss_argv_t argv); +void do_irel_ma_create(int argc, ss_argv_t argv); +void do_irel_free(int argc, ss_argv_t argv); +void do_irel_put(int argc, ss_argv_t argv); +void do_irel_get(int argc, ss_argv_t argv); +void do_irel_get_by_orig(int argc, ss_argv_t argv); +void do_irel_start_iter(int argc, ss_argv_t argv); +void do_irel_next(int argc, ss_argv_t argv); +void do_irel_dump(int argc, ss_argv_t argv); +void do_irel_add_ref(int argc, ss_argv_t argv); +void do_irel_start_iter_ref(int argc, ss_argv_t argv); +void do_irel_next_ref(int argc, ss_argv_t argv); +void do_irel_move(int argc, ss_argv_t argv); +void do_irel_delete(int argc, ss_argv_t argv); |