Update of /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16151/e2fsck
Modified Files:
Tag: OPENSSI-DEBIAN
ChangeLog Makefile.in e2fsck.8.in e2fsck.c pass1.c pass1b.c
problem.c unix.c
Log Message:
merge with latest version from debian
Index: pass1.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/pass1.c,v
retrieving revision 1.1.5.1.2.1
retrieving revision 1.1.5.1.2.2
diff -u -d -r1.1.5.1.2.1 -r1.1.5.1.2.2
--- pass1.c 23 Feb 2004 00:58:45 -0000 1.1.5.1.2.1
+++ pass1.c 25 May 2004 05:39:47 -0000 1.1.5.1.2.2
@@ -78,7 +78,7 @@
struct process_block_struct {
ext2_ino_t ino;
- int is_dir:1, is_reg:1, clear:1, suppress:1,
+ unsigned is_dir:1, is_reg:1, clear:1, suppress:1,
fragmented:1, compressed:1, bbcheck:1;
blk_t num_blocks;
blk_t max_blocks;
Index: Makefile.in
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/Makefile.in,v
retrieving revision 1.1.5.1.2.1
retrieving revision 1.1.5.1.2.2
diff -u -d -r1.1.5.1.2.1 -r1.1.5.1.2.2
--- Makefile.in 5 Dec 2003 01:09:18 -0000 1.1.5.1.2.1
+++ Makefile.in 25 May 2004 05:39:47 -0000 1.1.5.1.2.2
@@ -25,9 +25,9 @@
$(DEPSTATIC_LIBUUID)
PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \
- $(PROFILED_BLKID) $(PROFILED_LIBUUID) $(LIBINTL)
+ $(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) $(LIBINTL)
PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \
- $(PROFILED_BLKID) $(DEPPROFILED_LIBUUID)
+ $(PROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID)
.c.o:
$(CC) -c $(ALL_CFLAGS) $< -o $@
@@ -105,7 +105,7 @@
e2fsck: e2fsck.@E2FSCK_TYPE@
$(CP) e2fsck.@E2FSCK_TYPE@ e2fsck
-e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
+e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
$(STATIC_LIBS) $(LIBCLUSTER)
@@ -137,7 +137,7 @@
mkdir profiled
e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
- $(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8
+ $(SUBSTITUTE_UPTIME) $(srcdir)/e2fsck.8.in e2fsck.8
installdirs:
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
Index: e2fsck.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/e2fsck.c,v
retrieving revision 1.1.5.1
retrieving revision 1.1.5.1.2.1
diff -u -d -r1.1.5.1 -r1.1.5.1.2.1
--- e2fsck.c 1 Aug 2003 13:41:05 -0000 1.1.5.1
+++ e2fsck.c 25 May 2004 05:39:47 -0000 1.1.5.1.2.1
@@ -180,8 +180,10 @@
pass_t e2fsck_pass;
#ifdef HAVE_SETJMP_H
- if (setjmp(ctx->abort_loc))
+ if (setjmp(ctx->abort_loc)) {
+ ctx->flags &= ~E2F_FLAG_SETJMP_OK;
return (ctx->flags & E2F_FLAG_RUN_RETURN);
+ }
ctx->flags |= E2F_FLAG_SETJMP_OK;
#endif
Index: unix.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/unix.c,v
retrieving revision 1.1.5.1.2.1
retrieving revision 1.1.5.1.2.2
diff -u -d -r1.1.5.1.2.1 -r1.1.5.1.2.2
--- unix.c 23 Feb 2004 00:58:45 -0000 1.1.5.1.2.1
+++ unix.c 25 May 2004 05:39:47 -0000 1.1.5.1.2.2
@@ -39,6 +39,12 @@
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
#include "et/com_err.h"
#include "e2fsck.h"
@@ -53,6 +59,7 @@
static int verbose;
static int replace_bad_blocks;
+static int keep_bad_blocks;
static char *bad_blocks_file;
e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
@@ -202,8 +209,10 @@
static int is_on_batt(void)
{
FILE *f;
- char tmp[80], tmp2[80];
+ DIR *d;
+ char tmp[80], tmp2[80], fname[80];
unsigned int acflag;
+ struct dirent* de;
f = fopen("/proc/apm", "r");
if (f) {
@@ -212,14 +221,24 @@
fclose(f);
return (acflag != 1);
}
- f = fopen("/proc/acpi/ac_adapter/AC/state", "r");
- if (f) {
+ d = opendir("/proc/acpi/ac_adapter");
+ while (d && (de=readdir(d))) {
+ if (!strncmp(".", de->d_name, 1))
+ continue;
+ snprintf(fname, 80, "/proc/acpi/ac_adapter/%s/state",
+ de->d_name);
+ f = fopen(fname, "r");
+ if (!f)
+ continue;
if (fscanf(f, "%s %s", tmp2, tmp) != 2)
tmp[0] = 0;
fclose(f);
- if (strncmp(tmp, "off-line", 8) == 0)
+ if (strncmp(tmp, "off-line", 8) == 0) {
+ closedir(d);
return 1;
+ }
}
+ closedir(d);
return 0;
}
@@ -279,7 +298,8 @@
if (next_check <= 0)
next_check = 1;
}
- if ((now - fs->super->s_lastcheck) >= fs->super->s_checkinterval)
+ if (fs->super->s_checkinterval &&
+ ((now - fs->super->s_lastcheck) >= fs->super->s_checkinterval))
next_check = 1;
if (next_check <= 5) {
if (next_check == 1)
@@ -554,7 +574,7 @@
ctx->program_name = *argv;
else
ctx->program_name = "e2fsck";
- while ((c = getopt (argc, argv,
"panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsD")) != EOF)
+ while ((c = getopt (argc, argv,
"panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDk")) != EOF)
switch (c) {
case 'C':
ctx->progress = e2fsck_update_progress;
@@ -675,6 +695,9 @@
"of e2fsck\n"));
exit(1);
#endif
+ case 'k':
+ keep_bad_blocks++;
+ break;
default:
usage(ctx);
}
@@ -1034,7 +1057,7 @@
if (bad_blocks_file)
read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
else if (cflag)
- read_bad_blocks_file(ctx, 0, 1); /* Test disk */
+ read_bad_blocks_file(ctx, 0, !keep_bad_blocks); /* Test disk */
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
fatal_error(ctx, 0);
#ifdef ENABLE_SWAPFS
Index: problem.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/problem.c,v
retrieving revision 1.1.5.1.2.1
retrieving revision 1.1.5.1.2.2
diff -u -d -r1.1.5.1.2.1 -r1.1.5.1.2.2
--- problem.c 23 Feb 2004 00:58:45 -0000 1.1.5.1.2.1
+++ problem.c 25 May 2004 05:39:47 -0000 1.1.5.1.2.2
@@ -724,12 +724,12 @@
/* Duplicate/bad block(s) in inode */
{ PR_1B_DUP_BLOCK,
" %b",
- PROMPT_NONE, PR_LATCH_DBLOCK },
+ PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR },
/* Duplicate/bad block(s) end */
{ PR_1B_DUP_BLOCK_END,
"\n",
- PROMPT_NONE, 0 },
+ PROMPT_NONE, PR_PREEN_NOHDR },
/* Error while scanning inodes */
{ PR_1B_ISCAN_ERROR,
Index: ChangeLog
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/ChangeLog,v
retrieving revision 1.1.5.1.2.1
retrieving revision 1.1.5.1.2.2
diff -u -d -r1.1.5.1.2.1 -r1.1.5.1.2.2
--- ChangeLog 23 Feb 2004 00:58:44 -0000 1.1.5.1.2.1
+++ ChangeLog 25 May 2004 05:39:47 -0000 1.1.5.1.2.2
@@ -1,3 +1,44 @@
+2004-05-04 Theodore Ts'o <tytso@xxxxxxx>
+
+ * unix.c (check_if_skip): If the checkinterval is zero, then
+ disregard it when calculating when the next check will
+ take place.
+
+2004-04-12 Theodore Ts'o <tytso@xxxxxxx>
+
+ * unix.c (is_on_batt): Be more flexible about the name of the ACPI
+ device that corresponds to the AC adapter. (Addresses
+ Debian bug #242136)
+
+2004-04-03 Theodore Ts'o <tytso@xxxxxxx>
+
+ * Makefile.in: Update the modtime even if subst doesn't need to
+ update the e2fsck man page, to avoid always re-running
+ subst, especially since there are no dependencies on the
+ man page.
+
+2004-02-28 Theodore Ts'o <tytso@xxxxxxx>
+
+ * Release of E2fsprogs 1.35
+
+2004-02-24 Theodore Ts'o <tytso@xxxxxxx>
+
+ * unix.c (main, PRS), e2fsck.8.in: Add a new -k option which keeps
+ the existing badblocks list when using the -c option.
+ (Addresses Debian bug #229103)
+
+2004-02-23 Theodore Ts'o <tytso@xxxxxxx>
+
+ * Makefile.in (PROFILED_LIBS, PROFILED_DEPLIBS): Fix reference to
+ libblkid so that the build will work with --enable-profile
+ (Addresses Sourceforge bug #811408)
+
+2004-02-14 Theodore Ts'o <tytso@xxxxxxx>
+
+ * e2fsck.c (e2fsck_run): Clear the SETJMP_OK flag when returning
+ so we don't double longjump into an invalid stack frame.
+ (Thanks to Matthias Andree for providing this fix.)
+
2004-01-31 Theodore Ts'o <tytso@xxxxxxx>
* problem.c (fix_problem): Don't call print_e2fsck_message if the
Index: pass1b.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/pass1b.c,v
retrieving revision 1.1.5.1.2.1
retrieving revision 1.1.5.1.2.2
diff -u -d -r1.1.5.1.2.1 -r1.1.5.1.2.2
--- pass1b.c 23 Feb 2004 00:58:45 -0000 1.1.5.1.2.1
+++ pass1b.c 25 May 2004 05:39:47 -0000 1.1.5.1.2.2
@@ -248,7 +248,8 @@
clear_problem_context(&pctx);
- fix_problem(ctx, PR_1B_PASS_HEADER, &pctx);
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1B_PASS_HEADER, &pctx);
pctx.errcode = ext2fs_open_inode_scan(fs, ctx->inode_buffer_blocks,
&scan);
if (pctx.errcode) {
@@ -382,7 +383,8 @@
clear_problem_context(&pctx);
- fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
/*
* Search through all directories to translate inodes to names
@@ -412,7 +414,8 @@
clear_problem_context(&pctx);
- fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
e2fsck_read_bitmaps(ctx);
pctx.num = dup_inode_count; /* dict_count(&ino_dict); */
Index: e2fsck.8.in
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/e2fsck/Attic/e2fsck.8.in,v
retrieving revision 1.1.5.1
retrieving revision 1.1.5.1.2.1
diff -u -d -r1.1.5.1 -r1.1.5.1.2.1
--- e2fsck.8.in 4 Dec 2003 19:39:00 -0000 1.1.5.1
+++ e2fsck.8.in 25 May 2004 05:39:47 -0000 1.1.5.1.2.1
@@ -8,7 +8,7 @@
.SH SYNOPSIS
.B e2fsck
[
-.B \-pacnyrdfvstDFSV
+.B \-pacnyrdfkvstDFSV
]
[
.B \-b
@@ -160,6 +160,14 @@
@JDEV@Set the pathname where the external-journal for this filesystem can be
@JDEV@found.
.TP
+.BI \-k
+When combined with the
+.B \-c
+option, any existing bad blocks in the bad blocks list are preserved,
+and any new bad blocks found by running
+.BR badblocks (8)
+will be added to the existing bad blocks list.
+.TP
.BI \-l " filename"
Add the block numbers listed in the file specified by
.I filename
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
|