1997-04-29 21:48:10 +04:00
|
|
|
/*
|
|
|
|
* test_icount.c
|
2008-08-28 07:07:54 +04:00
|
|
|
*
|
1997-04-29 21:48:10 +04:00
|
|
|
* Copyright (C) 1997 Theodore Ts'o.
|
|
|
|
*
|
|
|
|
* %Begin-Header%
|
|
|
|
* This file may be redistributed under the terms of the GNU Public
|
|
|
|
* License.
|
|
|
|
* %End-Header%
|
|
|
|
*/
|
|
|
|
|
2011-09-19 01:34:37 +04:00
|
|
|
#include "config.h"
|
1997-04-29 21:48:10 +04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#ifdef HAVE_GETOPT_H
|
|
|
|
#include <getopt.h>
|
|
|
|
#endif
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2image.c, findsuper.c, lsattr.c,
mke2fs.c, mklost+found.c, tune2fs.c, util.c: Change location of
ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, resize2fs.h:
resize2fs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, debugfs.h:
debugfs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, e2fsck.h, scantest.c:
e2fsck.h, scantest.c: Change location of ext2_fs.h to be
ext2fs/ext2_fs.h
ChangeLog, Makefile.in, tst_uuid.c, uuid_time.c:
tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h
ChangeLog, Makefile.in, e2p.h:
e2p.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change location of ext2_fs.h to be
ext2fs/ext2_fs.h
2001-05-14 15:45:38 +04:00
|
|
|
#include <ext2fs/ext2_fs.h>
|
1997-04-29 21:48:10 +04:00
|
|
|
|
|
|
|
#include <et/com_err.h>
|
|
|
|
#include <ss/ss.h>
|
|
|
|
#include <ext2fs/ext2fs.h>
|
|
|
|
#include <ext2fs/irel.h>
|
|
|
|
#include <ext2fs/brel.h>
|
|
|
|
|
|
|
|
extern ss_request_table test_cmds;
|
|
|
|
|
|
|
|
#include "test_icount.h"
|
|
|
|
|
|
|
|
ext2_filsys test_fs;
|
|
|
|
ext2_icount_t test_icount;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Helper function which assures that the icount structure is valid
|
|
|
|
*/
|
|
|
|
static int check_icount(char *request)
|
|
|
|
{
|
|
|
|
if (test_icount)
|
|
|
|
return 0;
|
|
|
|
com_err(request, 0, "The icount structure must be allocated.");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Helper function which parses an inode number.
|
|
|
|
*/
|
|
|
|
static int parse_inode(const char *request, const char *desc,
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
const char *str, ext2_ino_t *ino)
|
1997-04-29 21:48:10 +04:00
|
|
|
{
|
|
|
|
char *tmp;
|
2008-08-28 07:07:54 +04:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
*ino = strtoul(str, &tmp, 0);
|
|
|
|
if (*tmp) {
|
|
|
|
com_err(request, 0, "Bad %s - %s", desc, str);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_create_icount(int argc, char **argv)
|
|
|
|
{
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
errcode_t retval;
|
|
|
|
char *progname;
|
|
|
|
int flags = 0;
|
|
|
|
ext2_ino_t size = 5;
|
1997-04-29 21:48:10 +04:00
|
|
|
|
|
|
|
progname = *argv;
|
|
|
|
argv++; argc --;
|
|
|
|
|
|
|
|
if (argc && !strcmp("-i", *argv)) {
|
|
|
|
flags |= EXT2_ICOUNT_OPT_INCREMENT;
|
|
|
|
argv++; argc--;
|
|
|
|
}
|
|
|
|
if (argc) {
|
|
|
|
if (parse_inode(progname, "icount size", argv[0], &size))
|
|
|
|
return;
|
|
|
|
argv++; argc--;
|
|
|
|
}
|
|
|
|
#if 0
|
|
|
|
printf("Creating icount... flags=%d, size=%d\n", flags, (int) size);
|
|
|
|
#endif
|
|
|
|
retval = ext2fs_create_icount(test_fs, flags, (int) size,
|
|
|
|
&test_icount);
|
|
|
|
if (retval) {
|
|
|
|
com_err(progname, retval, "while creating icount");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_free_icount(int argc, char **argv)
|
|
|
|
{
|
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
|
|
|
|
ext2fs_free_icount(test_icount);
|
|
|
|
test_icount = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_fetch(int argc, char **argv)
|
|
|
|
{
|
2007-04-07 17:06:46 +04:00
|
|
|
const char *usage = "usage: %s inode\n";
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
errcode_t retval;
|
|
|
|
ext2_ino_t ino;
|
|
|
|
__u16 count;
|
2008-08-28 07:07:54 +04:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
if (argc < 2) {
|
|
|
|
printf(usage, argv[0]);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
if (parse_inode(argv[0], "inode", argv[1], &ino))
|
|
|
|
return;
|
|
|
|
retval = ext2fs_icount_fetch(test_icount, ino, &count);
|
|
|
|
if (retval) {
|
|
|
|
com_err(argv[0], retval, "while calling ext2fs_icount_fetch");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
printf("Count is %u\n", count);
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_increment(int argc, char **argv)
|
|
|
|
{
|
2007-04-07 17:06:46 +04:00
|
|
|
const char *usage = "usage: %s inode\n";
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
errcode_t retval;
|
|
|
|
ext2_ino_t ino;
|
|
|
|
__u16 count;
|
2008-08-28 07:07:54 +04:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
if (argc < 2) {
|
|
|
|
printf(usage, argv[0]);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
if (parse_inode(argv[0], "inode", argv[1], &ino))
|
|
|
|
return;
|
|
|
|
retval = ext2fs_icount_increment(test_icount, ino, &count);
|
|
|
|
if (retval) {
|
|
|
|
com_err(argv[0], retval,
|
|
|
|
"while calling ext2fs_icount_increment");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
printf("Count is now %u\n", count);
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_decrement(int argc, char **argv)
|
|
|
|
{
|
2007-04-07 17:06:46 +04:00
|
|
|
const char *usage = "usage: %s inode\n";
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
errcode_t retval;
|
|
|
|
ext2_ino_t ino;
|
|
|
|
__u16 count;
|
2008-08-28 07:07:54 +04:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
if (argc < 2) {
|
|
|
|
printf(usage, argv[0]);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
if (parse_inode(argv[0], "inode", argv[1], &ino))
|
|
|
|
return;
|
|
|
|
retval = ext2fs_icount_decrement(test_icount, ino, &count);
|
|
|
|
if (retval) {
|
|
|
|
com_err(argv[0], retval,
|
2007-04-07 17:06:46 +04:00
|
|
|
"while calling ext2fs_icount_decrement");
|
1997-04-29 21:48:10 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
printf("Count is now %u\n", count);
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_store(int argc, char **argv)
|
|
|
|
{
|
2007-04-07 17:06:46 +04:00
|
|
|
const char *usage = "usage: %s inode count\n";
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
errcode_t retval;
|
|
|
|
ext2_ino_t ino;
|
|
|
|
ext2_ino_t count;
|
2008-08-28 07:07:54 +04:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
if (argc < 3) {
|
|
|
|
printf(usage, argv[0]);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
if (parse_inode(argv[0], "inode", argv[1], &ino))
|
|
|
|
return;
|
|
|
|
if (parse_inode(argv[0], "count", argv[2], &count))
|
|
|
|
return;
|
|
|
|
if (count > 65535) {
|
|
|
|
printf("Count too large.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
retval = ext2fs_icount_store(test_icount, ino, (__u16) count);
|
|
|
|
if (retval) {
|
|
|
|
com_err(argv[0], retval,
|
|
|
|
"while calling ext2fs_icount_store");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_dump(int argc, char **argv)
|
|
|
|
{
|
|
|
|
errcode_t retval;
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
ext2_ino_t i;
|
1997-04-29 21:48:10 +04:00
|
|
|
__u16 count;
|
|
|
|
|
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
for (i=1; i <= test_fs->super->s_inodes_count; i++) {
|
|
|
|
retval = ext2fs_icount_fetch(test_icount, i, &count);
|
|
|
|
if (retval) {
|
|
|
|
com_err(argv[0], retval,
|
2003-12-28 15:04:35 +03:00
|
|
|
"while fetching icount for %lu", (unsigned long)i);
|
1997-04-29 21:48:10 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (count)
|
2003-12-28 15:04:35 +03:00
|
|
|
printf("%lu: %u\n", (unsigned long)i, count);
|
1997-04-29 21:48:10 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_validate(int argc, char **argv)
|
|
|
|
{
|
|
|
|
errcode_t retval;
|
1997-10-26 02:50:09 +03:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
retval = ext2fs_icount_validate(test_icount, stdout);
|
|
|
|
if (retval) {
|
|
|
|
com_err(argv[0], retval, "while validating icount structure");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
printf("Icount structure successfully validated\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_get_size(int argc, char **argv)
|
|
|
|
{
|
ChangeLog, libext2fs.texinfo:
libext2fs.texinfo: Change ino_t to ext2_ino_t
ChangeLog, extent.c, main.c, resize2fs.c:
extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, mke2fs.c:
mke2fs.c: Change ino_t to ext2_ino_t.
ChangeLog, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change ino_t to ext2_ino_t
2001-01-11 18:38:00 +03:00
|
|
|
ext2_ino_t size;
|
2003-12-28 15:04:35 +03:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
if (check_icount(argv[0]))
|
|
|
|
return;
|
|
|
|
size = ext2fs_get_icount_size(test_icount);
|
2003-12-28 15:04:35 +03:00
|
|
|
printf("Size of icount is: %lu\n", (unsigned long)size);
|
1997-04-29 21:48:10 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static int source_file(const char *cmd_file, int sci_idx)
|
|
|
|
{
|
|
|
|
FILE *f;
|
|
|
|
char buf[256];
|
|
|
|
char *cp;
|
|
|
|
int exit_status = 0;
|
|
|
|
int retval;
|
|
|
|
int noecho;
|
|
|
|
|
|
|
|
if (strcmp(cmd_file, "-") == 0)
|
|
|
|
f = stdin;
|
|
|
|
else {
|
|
|
|
f = fopen(cmd_file, "r");
|
|
|
|
if (!f) {
|
|
|
|
perror(cmd_file);
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
}
|
2008-07-13 23:40:15 +04:00
|
|
|
fflush(stdout);
|
|
|
|
fflush(stderr);
|
1997-04-29 21:48:10 +04:00
|
|
|
setbuf(stdout, NULL);
|
|
|
|
setbuf(stderr, NULL);
|
|
|
|
while (!feof(f)) {
|
|
|
|
if (fgets(buf, sizeof(buf), f) == NULL)
|
|
|
|
break;
|
|
|
|
if (buf[0] == '#')
|
|
|
|
continue;
|
|
|
|
noecho = 0;
|
|
|
|
if (buf[0] == '-') {
|
|
|
|
noecho = 1;
|
|
|
|
buf[0] = ' ';
|
|
|
|
}
|
|
|
|
cp = strchr(buf, '\n');
|
|
|
|
if (cp)
|
|
|
|
*cp = 0;
|
|
|
|
cp = strchr(buf, '\r');
|
|
|
|
if (cp)
|
|
|
|
*cp = 0;
|
|
|
|
if (!noecho)
|
|
|
|
printf("test_icount: %s\n", buf);
|
|
|
|
retval = ss_execute_line(sci_idx, buf);
|
|
|
|
if (retval) {
|
|
|
|
ss_perror(sci_idx, retval, buf);
|
|
|
|
exit_status++;
|
|
|
|
}
|
|
|
|
}
|
2011-09-17 00:49:35 +04:00
|
|
|
if (f != stdin)
|
|
|
|
fclose(f);
|
1997-04-29 21:48:10 +04:00
|
|
|
return exit_status;
|
|
|
|
}
|
|
|
|
|
ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
1998-06-27 09:11:14 +04:00
|
|
|
int main(int argc, char **argv)
|
1997-04-29 21:48:10 +04:00
|
|
|
{
|
|
|
|
int retval;
|
|
|
|
int sci_idx;
|
1998-06-27 09:20:20 +04:00
|
|
|
int c;
|
1997-04-29 21:48:10 +04:00
|
|
|
char *request = 0;
|
|
|
|
int exit_status = 0;
|
|
|
|
char *cmd_file = 0;
|
|
|
|
struct ext2_super_block param;
|
2008-08-28 07:07:54 +04:00
|
|
|
|
1997-04-29 21:48:10 +04:00
|
|
|
initialize_ext2_error_table();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a sample filesystem structure
|
|
|
|
*/
|
|
|
|
memset(¶m, 0, sizeof(struct ext2_super_block));
|
2009-09-08 04:46:34 +04:00
|
|
|
ext2fs_blocks_count_set(¶m, 80000);
|
1997-04-29 21:48:10 +04:00
|
|
|
param.s_inodes_count = 20000;
|
|
|
|
retval = ext2fs_initialize("/dev/null", 0, ¶m,
|
|
|
|
unix_io_manager, &test_fs);
|
|
|
|
if (retval) {
|
|
|
|
com_err("/dev/null", retval, "while setting up test fs");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
while ((c = getopt (argc, argv, "wR:f:")) != EOF) {
|
|
|
|
switch (c) {
|
|
|
|
case 'R':
|
|
|
|
request = optarg;
|
|
|
|
break;
|
|
|
|
case 'f':
|
|
|
|
cmd_file = optarg;
|
|
|
|
break;
|
|
|
|
default:
|
2009-01-20 21:05:25 +03:00
|
|
|
com_err(argv[0], 0, "Usage: test_icount "
|
|
|
|
"[-R request] [-f cmd_file]");
|
ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
1998-06-27 09:11:14 +04:00
|
|
|
exit(1);
|
1997-04-29 21:48:10 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
sci_idx = ss_create_invocation("test_icount", "0.0", (char *) NULL,
|
|
|
|
&test_cmds, &retval);
|
|
|
|
if (retval) {
|
|
|
|
ss_perror(sci_idx, retval, "creating invocation");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
(void) ss_add_request_table (sci_idx, &ss_std_requests, 1, &retval);
|
|
|
|
if (retval) {
|
|
|
|
ss_perror(sci_idx, retval, "adding standard requests");
|
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
if (request) {
|
|
|
|
retval = 0;
|
|
|
|
retval = ss_execute_line(sci_idx, request);
|
|
|
|
if (retval) {
|
|
|
|
ss_perror(sci_idx, retval, request);
|
|
|
|
exit_status++;
|
|
|
|
}
|
|
|
|
} else if (cmd_file) {
|
|
|
|
exit_status = source_file(cmd_file, sci_idx);
|
|
|
|
} else {
|
|
|
|
ss_listen(sci_idx);
|
|
|
|
}
|
|
|
|
|
ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
1998-06-27 09:11:14 +04:00
|
|
|
return(exit_status);
|
1997-04-29 21:48:10 +04:00
|
|
|
}
|