View | Details | Raw Unified | Return to bug 63528
Collapse All | Expand All

(-)/root/e2fsprogs/Makefile (-4 / +1 lines)
Lines 6-16 Link Here
6
#
6
#
7
7
8
PORTNAME=	e2fsprogs
8
PORTNAME=	e2fsprogs
9
PORTVERSION=	1.35.w20040131.20040224135102
9
PORTVERSION=	1.35
10
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITE_SUBDIR=	${PORTNAME}
12
MASTER_SITE_SUBDIR=	${PORTNAME}
13
DISTNAME=	${PORTNAME}-1.35-WIP-0131
14
13
15
MAINTAINER=	matthias.andree@gmx.de
14
MAINTAINER=	matthias.andree@gmx.de
16
COMMENT=	Utilities and library to manipulate an ext2 or ext3 filesystem
15
COMMENT=	Utilities and library to manipulate an ext2 or ext3 filesystem
Lines 18-25 Link Here
18
.if !defined(DISABLE_NLS)
17
.if !defined(DISABLE_NLS)
19
USE_GETTEXT=	yes
18
USE_GETTEXT=	yes
20
.endif
19
.endif
21
22
WRKSRC=	${WRKDIR}/${PORTNAME}-1.35
23
20
24
USE_GCC=	3.3
21
USE_GCC=	3.3
25
PATCH_STRIP=	-p1
22
PATCH_STRIP=	-p1
(-)/root/e2fsprogs/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (e2fsprogs-1.35-WIP-0131.tar.gz) = eccc46cd55d8295d686cf5ac6bbc3784
1
MD5 (e2fsprogs-1.35.tar.gz) = 8d25ffd60d405ef32d341704a2323807
2
SIZE (e2fsprogs-1.35-WIP-0131.tar.gz) = 3123309
2
SIZE (e2fsprogs-1.35.tar.gz) = 3152299
(-)/root/e2fsprogs/files/patch-update-to-20040224 (-262 lines)
Lines 1-262 Link Here
1
diff -Nru a/debugfs/debugfs.8.in b/debugfs/debugfs.8.in
2
--- a/debugfs/debugfs.8.in	Wed Feb 25 02:10:02 2004
3
+++ b/debugfs/debugfs.8.in	Wed Feb 25 02:10:02 2004
4
@@ -237,7 +237,7 @@
5
 of the inode
6
 .IR filespec .
7
 .TP
8
-.I initialize device blocksize
9
+.I init_filesys device blocksize
10
 Create an ext2 file system on
11
 .I device
12
 with device size
13
diff -Nru a/debugfs/debugfs.c b/debugfs/debugfs.c
14
--- a/debugfs/debugfs.c	Wed Feb 25 02:10:02 2004
15
+++ b/debugfs/debugfs.c	Wed Feb 25 02:10:02 2004
16
@@ -456,9 +456,26 @@
17
 	if (inode->i_dtime) 
18
 	  fprintf(out, "%sdtime: 0x%08x -- %s", prefix, inode->i_dtime,
19
 		  time_to_string(inode->i_dtime));
20
-	if (LINUX_S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
21
+	if (LINUX_S_ISLNK(inode->i_mode) && ext2fs_inode_data_blocks(current_fs,inode) == 0)
22
 		fprintf(out, "%sFast_link_dest: %.*s\n", prefix,
23
 			(int) inode->i_size, (char *)inode->i_block);
24
+	else if (LINUX_S_ISBLK(inode->i_mode) || LINUX_S_ISCHR(inode->i_mode)) {
25
+		int major, minor;
26
+		const char *devnote;
27
+
28
+		if (inode->i_block[0]) {
29
+			major = (inode->i_block[0] >> 8) & 255;
30
+			minor = inode->i_block[0] & 255;
31
+			devnote = "";
32
+		} else {
33
+			major = (inode->i_block[1] & 0xfff00) >> 8;
34
+			minor = ((inode->i_block[1] & 0xff) | 
35
+				 ((inode->i_block[1] >> 12) & 0xfff00));
36
+			devnote = "(New-style) ";
37
+		}
38
+		fprintf(out, "%sDevice major/minor number: %02d:%02d (hex %02x:%02x)\n", 
39
+			devnote, major, minor, major, minor);
40
+	}
41
 	else if (do_dump_blocks)
42
 		dump_blocks(out, prefix, inode_num);
43
 }
44
@@ -1181,7 +1198,7 @@
45
 	if (nr == 5) {
46
 		major = strtoul(argv[3], argv+3, 0);
47
 		minor = strtoul(argv[4], argv+4, 0);
48
-		if (major > 255 || minor > 255 || argv[3][0] || argv[4][0])
49
+		if (major > 65535 || minor > 65535 || argv[3][0] || argv[4][0])
50
 			nr = 0;
51
 	}
52
 	if (argc != nr)
53
@@ -1215,7 +1232,13 @@
54
 	memset(&inode, 0, sizeof(inode));
55
 	inode.i_mode = mode;
56
 	inode.i_atime = inode.i_ctime = inode.i_mtime = time(NULL);
57
-	inode.i_block[0] = major*256+minor;
58
+	if ((major < 256) && (minor < 256)) {
59
+		inode.i_block[0] = major*256+minor;
60
+		inode.i_block[1] = 0;
61
+	} else {
62
+		inode.i_block[0] = 0;
63
+		inode.i_block[1] = (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
64
+	}
65
 	inode.i_links_count = 1;
66
 	if (debugfs_write_inode(newfile, &inode, argv[0]))
67
 		return;
68
diff -Nru a/e2fsck/Makefile.in b/e2fsck/Makefile.in
69
--- a/e2fsck/Makefile.in	Wed Feb 25 02:10:02 2004
70
+++ b/e2fsck/Makefile.in	Wed Feb 25 02:10:02 2004
71
@@ -25,9 +25,9 @@
72
 	$(DEPSTATIC_LIBUUID)
73
 
74
 PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \
75
-	$(PROFILED_BLKID) $(PROFILED_LIBUUID) $(LIBINTL)
76
+	$(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) $(LIBINTL)
77
 PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \
78
-	$(PROFILED_BLKID) $(DEPPROFILED_LIBUUID)
79
+	$(PROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID)
80
 
81
 .c.o:
82
 	$(CC) -c $(ALL_CFLAGS) $< -o $@
83
diff -Nru a/e2fsck/e2fsck.8.in b/e2fsck/e2fsck.8.in
84
--- a/e2fsck/e2fsck.8.in	Wed Feb 25 02:10:02 2004
85
+++ b/e2fsck/e2fsck.8.in	Wed Feb 25 02:10:02 2004
86
@@ -8,7 +8,7 @@
87
 .SH SYNOPSIS
88
 .B e2fsck
89
 [
90
-.B \-pacnyrdfvstDFSV
91
+.B \-pacnyrdfkvstDFSV
92
 ]
93
 [
94
 .B \-b
95
@@ -159,6 +159,14 @@
96
 @JDEV@.BI \-j " external-journal"
97
 @JDEV@Set the pathname where the external-journal for this filesystem can be
98
 @JDEV@found.
99
+.TP
100
+.BI \-k
101
+When combined with the 
102
+.B \-c
103
+option, any existing bad blocks in the bad blocks list are preserved,
104
+and any new bad blocks found by running
105
+.BR badblocks (8) 
106
+will be added to the existing bad blocks list.
107
 .TP
108
 .BI \-l " filename"
109
 Add the block numbers listed in the file specified by 
110
diff -Nru a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c
111
--- a/e2fsck/e2fsck.c	Wed Feb 25 02:10:02 2004
112
+++ b/e2fsck/e2fsck.c	Wed Feb 25 02:10:02 2004
113
@@ -180,8 +180,10 @@
114
 	pass_t	e2fsck_pass;
115
 
116
 #ifdef HAVE_SETJMP_H
117
-	if (setjmp(ctx->abort_loc))
118
+	if (setjmp(ctx->abort_loc)) {
119
+		ctx->flags &= ~E2F_FLAG_SETJMP_OK;
120
 		return (ctx->flags & E2F_FLAG_RUN_RETURN);
121
+	}
122
 	ctx->flags |= E2F_FLAG_SETJMP_OK;
123
 #endif
124
 		
125
diff -Nru a/e2fsck/pass1b.c b/e2fsck/pass1b.c
126
--- a/e2fsck/pass1b.c	Wed Feb 25 02:10:02 2004
127
+++ b/e2fsck/pass1b.c	Wed Feb 25 02:10:02 2004
128
@@ -248,7 +248,8 @@
129
 	
130
 	clear_problem_context(&pctx);
131
 	
132
-	fix_problem(ctx, PR_1B_PASS_HEADER, &pctx);
133
+	if (!(ctx->options & E2F_OPT_PREEN))
134
+		fix_problem(ctx, PR_1B_PASS_HEADER, &pctx);
135
 	pctx.errcode = ext2fs_open_inode_scan(fs, ctx->inode_buffer_blocks,
136
 					      &scan);
137
 	if (pctx.errcode) {
138
@@ -382,7 +383,8 @@
139
 
140
 	clear_problem_context(&pctx);
141
 
142
-	fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
143
+	if (!(ctx->options & E2F_OPT_PREEN))
144
+		fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
145
 
146
 	/*
147
 	 * Search through all directories to translate inodes to names
148
@@ -412,7 +414,8 @@
149
 	
150
 	clear_problem_context(&pctx);
151
 	
152
-	fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
153
+	if (!(ctx->options & E2F_OPT_PREEN))
154
+		fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
155
 	e2fsck_read_bitmaps(ctx);
156
 
157
 	pctx.num = dup_inode_count; /* dict_count(&ino_dict); */
158
diff -Nru a/e2fsck/problem.c b/e2fsck/problem.c
159
--- a/e2fsck/problem.c	Wed Feb 25 02:10:02 2004
160
+++ b/e2fsck/problem.c	Wed Feb 25 02:10:02 2004
161
@@ -724,12 +724,12 @@
162
 	/* Duplicate/bad block(s) in inode */
163
 	{ PR_1B_DUP_BLOCK,	  
164
 	  " %b",
165
-	  PROMPT_NONE, PR_LATCH_DBLOCK },
166
+	  PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR },
167
 
168
 	/* Duplicate/bad block(s) end */
169
 	{ PR_1B_DUP_BLOCK_END,
170
 	  "\n",
171
-	  PROMPT_NONE, 0 },
172
+	  PROMPT_NONE, PR_PREEN_NOHDR },
173
 		  
174
 	/* Error while scanning inodes */
175
 	{ PR_1B_ISCAN_ERROR,
176
diff -Nru a/e2fsck/unix.c b/e2fsck/unix.c
177
--- a/e2fsck/unix.c	Wed Feb 25 02:10:02 2004
178
+++ b/e2fsck/unix.c	Wed Feb 25 02:10:02 2004
179
@@ -53,6 +53,7 @@
180
 static int verbose;
181
 
182
 static int replace_bad_blocks;
183
+static int keep_bad_blocks;
184
 static char *bad_blocks_file;
185
 
186
 e2fsck_t e2fsck_global_ctx;	/* Try your very best not to use this! */
187
@@ -554,7 +555,7 @@
188
 		ctx->program_name = *argv;
189
 	else
190
 		ctx->program_name = "e2fsck";
191
-	while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsD")) != EOF)
192
+	while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDk")) != EOF)
193
 		switch (c) {
194
 		case 'C':
195
 			ctx->progress = e2fsck_update_progress;
196
@@ -675,6 +676,8 @@
197
 					  "of e2fsck\n"));
198
 			exit(1);
199
 #endif
200
+		case 'k':
201
+			keep_bad_blocks++;
202
 		default:
203
 			usage(ctx);
204
 		}
205
@@ -1034,7 +1037,7 @@
206
 	if (bad_blocks_file)
207
 		read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
208
 	else if (cflag)
209
-		read_bad_blocks_file(ctx, 0, 1); /* Test disk */
210
+		read_bad_blocks_file(ctx, 0, !keep_bad_blocks); /* Test disk */
211
 	if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
212
 		fatal_error(ctx, 0);
213
 #ifdef ENABLE_SWAPFS
214
diff -Nru a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
215
--- a/lib/ext2fs/ext2fs.h	Wed Feb 25 02:10:02 2004
216
+++ b/lib/ext2fs/ext2fs.h	Wed Feb 25 02:10:02 2004
217
@@ -977,7 +977,7 @@
218
 /*
219
  *  Resize memory
220
  */
221
-_INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size EXT2FS_ATTR((unused)),
222
+_INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size,
223
 				     unsigned long size, void *ptr)
224
 {
225
 	void *p;
226
diff -Nru a/lib/ext2fs/namei.c b/lib/ext2fs/namei.c
227
--- a/lib/ext2fs/namei.c	Wed Feb 25 02:10:02 2004
228
+++ b/lib/ext2fs/namei.c	Wed Feb 25 02:10:02 2004
229
@@ -47,7 +47,7 @@
230
 	if (link_count++ > 5) {
231
 		return EXT2_ET_SYMLINK_LOOP;
232
 	}
233
-	if (ei.i_blocks) {
234
+	if (ext2fs_inode_data_blocks(fs,&ei)) {
235
 		retval = ext2fs_get_mem(fs->blocksize, &buffer);
236
 		if (retval)
237
 			return retval;
238
diff -Nru a/misc/fsck.c b/misc/fsck.c
239
--- a/misc/fsck.c	Wed Feb 25 02:10:02 2004
240
+++ b/misc/fsck.c	Wed Feb 25 02:10:02 2004
241
@@ -439,7 +439,7 @@
242
 	for (i=0; i <num_args; i++)
243
 		argv[argc++] = string_copy(args[i]);
244
 
245
-	if (progress & !progress_active()) {
246
+	if (progress && !progress_active()) {
247
 		if ((strcmp(type, "ext2") == 0) ||
248
 		    (strcmp(type, "ext3") == 0)) {
249
 			argv[argc++] = string_copy("-C0");
250
diff -Nru a/util/gen-tarball.in b/util/gen-tarball.in
251
--- a/util/gen-tarball.in	Wed Feb 25 02:10:02 2004
252
+++ b/util/gen-tarball.in	Wed Feb 25 02:10:02 2004
253
@@ -79,7 +79,8 @@
254
 (cd $top_srcdir/.. ; find $base_e2fsprogs \( -name \*~ -o -name \*.orig \
255
 		-o -name CVS -o -name \*.rej -o -name Makefile.pq \
256
 		-o -name TAGS -o -name \*.old -o -name \*.gmo -o -name SCCS \
257
-		-o -name changed-files -o -name .#\* -o -name \*.tar.gz \) \
258
+		-o -name changed-files -o -name .#\* -o -name \*.tar.gz \
259
+		-o -name autom4te.cache \) \
260
 		-print) | sed -e "s/^$base_e2fsprogs/$SRCROOT/" > $exclude
261
 sed -e "s;^;$SRCROOT/;" < $srcdir/$list.exclude >> $exclude
262
 

Return to bug 63528