aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-08-10 18:35:23 +0000
committerBill Nottingham <notting@redhat.com>1999-08-10 18:35:23 +0000
commit44b77f33bf06d25424cc0a4adf7a3aefa07c6d45 (patch)
treed4fa81d48b167c101c35c45a25ee86dc602ae2d5
parentee96d1d3a2e6f9563016585bc7ed10678f2bd577 (diff)
downloadinitscripts-44b77f33bf06d25424cc0a4adf7a3aefa07c6d45.tar
initscripts-44b77f33bf06d25424cc0a4adf7a3aefa07c6d45.tar.gz
initscripts-44b77f33bf06d25424cc0a4adf7a3aefa07c6d45.tar.bz2
initscripts-44b77f33bf06d25424cc0a4adf7a3aefa07c6d45.tar.xz
initscripts-44b77f33bf06d25424cc0a4adf7a3aefa07c6d45.zip
ignore anything before a ^H
ignore twiddles on lines by themselves allow BOL/EOL matching
-rw-r--r--src/initlog.c8
-rw-r--r--src/initlog.conf2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/initlog.c b/src/initlog.c
index 522d3618..32fa41db 100644
--- a/src/initlog.c
+++ b/src/initlog.c
@@ -50,7 +50,7 @@ void readConfiguration(char *fname) {
if (line[0]=='#') continue;
if (!strncmp(line,"ignore ",7)) {
regexp = malloc(sizeof(regex_t));
- if (!regcomp(regexp,line+7,REG_EXTENDED|REG_NOSUB)) {
+ if (!regcomp(regexp,line+7,REG_EXTENDED|REG_NOSUB|REG_NEWLINE)) {
regList = realloc(regList,(num+2) * sizeof(regex_t *));
regList[num] = regexp;
regList[num+1] = NULL;
@@ -92,7 +92,7 @@ void readConfiguration(char *fname) {
char *getLine(char **data) {
/* Get one line from data */
- /* Anything up to a carraige return (\r) is discarded. */
+ /* Anything up to a carraige return (\r) or a backspace (\b) is discarded. */
/* If this really bothers you, mail me and I might make it configurable. */
/* It's here to avoid confilcts with fsck's progress bar. */
char *x, *y;
@@ -100,8 +100,8 @@ char *getLine(char **data) {
if (!*data) return NULL;
x=*data;
while (*x && (*x != '\n')) {
- while (*x && (*x != '\n') && (*x != '\r')) x++;
- if (*x && *x=='\r') {
+ while (*x && (*x != '\n') && (*x != '\r') && (*x != '\b')) x++;
+ if (*x && (*x=='\r' || *x =='\b')) {
*data = x+1;
x++;
}
diff --git a/src/initlog.conf b/src/initlog.conf
index ff503dcc..aa20c399 100644
--- a/src/initlog.conf
+++ b/src/initlog.conf
@@ -17,3 +17,5 @@ priority notice
# This regexp is useful if you use fsck's -C option.
ignore [^:]+: \|[=]+
+# This regexp is useful for quotacheck
+ignore ^[-\\\|\/]$