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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
Alias -p "preen" to -a "auto".
http://bugs.gentoo.org/195988
--- a/doc/fsck.reiser4.8
+++ b/doc/fsck.reiser4.8
@@ -54,7 +54,7 @@
ignored.
.SH PLUGIN OPTIONS
.TP
-.B -p, --print-profile
+.B --print-profile
prints the plugin profile. This is the set of default plugins used for all
parts of a filesystem -- format, nodes, files, directories, hashes, etc. If
--override is specified, then prints modified plugins.
@@ -82,6 +82,9 @@
.B -f, --force
forces fsck to use whole disk, not block device or mounted partition.
.TP
+.B -p, --preen
+automatically repair minor corruptions on the filesystem.
+.TP
.B -c, --cache N
tunes number of nodes in the libreiser4 tree buffer cache
.RS
--- a/progs/fsck/fsck.c
+++ b/progs/fsck/fsck.c
@@ -28,7 +28,7 @@
" -q, --quiet supresses gauges\n"
" -r ignored\n"
"Plugins options:\n"
- " -p, --print-profile prints the plugin profile.\n"
+ " --print-profile prints the plugin profile.\n"
" -l, --print-plugins prints all known plugins.\n"
" -o, --override TYPE=PLUGIN overrides the default plugin of the type\n"
" \"TYPE\" by the plugin \"PLUGIN\" in the\n"
@@ -39,6 +39,7 @@
" -y, --yes assumes an answer 'yes' to all questions.\n"
" -f, --force makes fsck to use whole disk, not block\n"
" device or mounted partition.\n"
+ " -p, --preen automatically repair the filesysem.\n"
" -c, --cache N number of nodes in tree buffer cache\n");
}
@@ -140,6 +141,7 @@
{"no-log", no_argument, NULL, 'n'},
{"auto", no_argument, NULL, 'a'},
{"force", no_argument, NULL, 'f'},
+ {"preen", no_argument, NULL, 'p'},
{"cache", required_argument, 0, 'c'},
{"override", required_argument, NULL, 'o'},
/* Fsck hidden options. */
@@ -190,6 +192,8 @@
case 'f':
aal_set_bit(&data->options, FSCK_OPT_FORCE);
break;
+ case 'p':
+ /* Fall through to auto, as preen is an alias for -a */
case 'a':
aal_set_bit(&data->options, FSCK_OPT_AUTO);
break;
@@ -226,9 +230,6 @@
case 'l':
mode = RM_SHOW_PLUG;
break;
- case 'p':
- mode = RM_SHOW_PARM;
- break;
case 'o':
aal_strncat(override, optarg, aal_strlen(optarg));
aal_strncat(override, ",", 1);
|