Package: e2fsprogs / 1.47.2-3~bpo12+1

0017-debugfs-return-after-printing-the-usage-message-in-t.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From: Theodore Ts'o <tytso@mit.edu>
Subject: debugfs: return after printing the usage message in the e2freefrag command

Origin: upstream, https://github.com/tytso/e2fsprogs/commit/0c675a67c5684252e3a228c824b0accb9f3ab5d7
---
 misc/e2freefrag.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/misc/e2freefrag.c b/misc/e2freefrag.c
index c66e8f22f..05f703966 100644
--- a/misc/e2freefrag.c
+++ b/misc/e2freefrag.c
@@ -409,6 +409,9 @@ int main(int argc, char *argv[])
 				fprintf(stderr, "%s: bad chunk size '%s'\n",
 					progname, optarg);
 				usage(progname);
+#ifdef DEBUFS
+				return;
+#endif
 			}
 			if (chunk_info.chunkbytes &
 			    (chunk_info.chunkbytes - 1)) {
@@ -421,6 +424,9 @@ int main(int argc, char *argv[])
 		case 'h':
 		default:
 			usage(progname);
+#ifdef DEBUGFS
+			return;
+#endif
 			break;
 		}
 	}
@@ -429,6 +435,9 @@ int main(int argc, char *argv[])
 	if (optind == argc) {
 		fprintf(stderr, "%s: missing device name.\n", progname);
 		usage(progname);
+#ifdef DEBUGFS
+		return;
+#endif
 	}
 
 	device_name = argv[optind];
-- 
2.47.2