mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
Updated error message text - feedback from proofreaders.
This commit is contained in:
parent
6393f224e5
commit
ce4ae3f281
1 changed files with 11 additions and 11 deletions
|
@ -92,7 +92,7 @@ int do_include_preprocessing(char *profilename)
|
||||||
if (profilename) {
|
if (profilename) {
|
||||||
profile = fopen(profilename, "r");
|
profile = fopen(profilename, "r");
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
PERROR(_("Error: couldn't read profile %s: %s\n"),
|
PERROR(_("Error: Could not read profile %s: %s.\n"),
|
||||||
profilename, strerror(errno));
|
profilename, strerror(errno));
|
||||||
exit(errno);
|
exit(errno);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ int do_include_preprocessing(char *profilename)
|
||||||
|
|
||||||
tmp = tmpfile();
|
tmp = tmpfile();
|
||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
PERROR(_("Error couldn't allocate temporary file\n"));
|
PERROR(_("Error: Could not allocate temporary file.\n"));
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ void set_base_dir(char *dir)
|
||||||
|
|
||||||
t = strndup(dir, PATH_MAX);
|
t = strndup(dir, PATH_MAX);
|
||||||
if (!t) {
|
if (!t) {
|
||||||
PERROR(_("Error: Out of Memory\n"));
|
PERROR(_("Error: Out of memory.\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ void set_base_dir(char *dir)
|
||||||
|
|
||||||
rc = stat(t, &sbuf);
|
rc = stat(t, &sbuf);
|
||||||
if (rc == -1 || !S_ISDIR(sbuf.st_mode)) {
|
if (rc == -1 || !S_ISDIR(sbuf.st_mode)) {
|
||||||
PERROR(_("basedir %s is not a directory, skipping\n"), t);
|
PERROR(_("Error: basedir %s is not a directory, skipping.\n"), t);
|
||||||
free(t);
|
free(t);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ int add_search_dir(char *dir)
|
||||||
{
|
{
|
||||||
char *t;
|
char *t;
|
||||||
if (npath >= MAX_PATH) {
|
if (npath >= MAX_PATH) {
|
||||||
PERROR(_("Error: Can't add directory %s to search path\n"),
|
PERROR(_("Error: Could not add directory %s to search path.\n"),
|
||||||
dir);
|
dir);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ int add_search_dir(char *dir)
|
||||||
|
|
||||||
t = malloc(strlen(dir) + 1);
|
t = malloc(strlen(dir) + 1);
|
||||||
if (t == NULL) {
|
if (t == NULL) {
|
||||||
PERROR(_("Error: Could not allocate memory\n"));
|
PERROR(_("Error: Could not allocate memory.\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
strcpy(t, dir);
|
strcpy(t, dir);
|
||||||
|
@ -329,7 +329,7 @@ static int getincludestr(char **inc, int c, FILE *f, int line, char *name,
|
||||||
/* found "#include" now search for the file name to include */
|
/* found "#include" now search for the file name to include */
|
||||||
b = malloc(2048);
|
b = malloc(2048);
|
||||||
if (!b) {
|
if (!b) {
|
||||||
PERROR(_("Error: could not allocate buffer for include. line %d in %s\n"),
|
PERROR(_("Error: Could not allocate buffer for include at line %d in %s.\n"),
|
||||||
line, name);
|
line, name);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
goto comment;
|
goto comment;
|
||||||
|
@ -345,7 +345,7 @@ static int getincludestr(char **inc, int c, FILE *f, int line, char *name,
|
||||||
/* eat whitespace */ ;
|
/* eat whitespace */ ;
|
||||||
if (c != '\"' && c != '<') {
|
if (c != '\"' && c != '<') {
|
||||||
free(b);
|
free(b);
|
||||||
PERROR(_("Error: bad include. line %d in %s\n"), line, name);
|
PERROR(_("Error: Bad include at line %d in %s.\n"), line, name);
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
ungetc(c, f);
|
ungetc(c, f);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
|
@ -365,7 +365,7 @@ static int getincludestr(char **inc, int c, FILE *f, int line, char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
free(b);
|
free(b);
|
||||||
PERROR(_("Error: bad include. line %d in %s\n"), line, name);
|
PERROR(_("Error: Bad include at line %d in %s.\n"), line, name);
|
||||||
ungetc(d, f);
|
ungetc(d, f);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
/* fall through to comment - this makes trailing stuff a comment */
|
/* fall through to comment - this makes trailing stuff a comment */
|
||||||
|
@ -395,7 +395,7 @@ static int preprocess(FILE * f, char *name, FILE * out, int nest)
|
||||||
char cwd[1024];
|
char cwd[1024];
|
||||||
|
|
||||||
if (nest > MAX_NEST_LEVEL) {
|
if (nest > MAX_NEST_LEVEL) {
|
||||||
PERROR(_("Error: exceeded %d levels of includes. NOT processing %s include\n"),
|
PERROR(_("Error: Exceeded %d levels of includes. Not processing %s include.\n"),
|
||||||
MAX_NEST_LEVEL, name);
|
MAX_NEST_LEVEL, name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -420,7 +420,7 @@ static int preprocess(FILE * f, char *name, FILE * out, int nest)
|
||||||
fclose(newf);
|
fclose(newf);
|
||||||
chdir(cwd);
|
chdir(cwd);
|
||||||
} else {
|
} else {
|
||||||
PERROR(_("Error: #include %s%c not found. line %d in %s\n"),
|
PERROR(_("Error: #include %s%c not found at line %d in %s.\n"),
|
||||||
inc,
|
inc,
|
||||||
*inc == '<' ? '>' : '\"',
|
*inc == '<' ? '>' : '\"',
|
||||||
line,
|
line,
|
||||||
|
|
Loading…
Add table
Reference in a new issue