Debug logging decreased for magic files tests
This commit is contained in:
parent
62bbdbe162
commit
5c47fa0c86
14
lib/magic.c
14
lib/magic.c
@ -73,10 +73,8 @@ int magic_check(char *Alias, char *FileName)
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
|
|
||||||
Syslog('f', "magic_check(%s, %s)", Alias, FileName);
|
|
||||||
|
|
||||||
if (!strlen(CFG.req_magic)) {
|
if (!strlen(CFG.req_magic)) {
|
||||||
WriteError("No magic filename path configured");
|
WriteError("magic_check(): no magic filename path configured");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,13 +101,3 @@ int magic_check(char *Alias, char *FileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get record for a magic alias in area.
|
|
||||||
*/
|
|
||||||
long magic_get(char *Name, long AreaNum)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2453,7 +2453,6 @@ int rearc(char *, char *, int); /* Rearc command */
|
|||||||
*/
|
*/
|
||||||
void magic_update(char *, char *); /* Update magic alias */
|
void magic_update(char *, char *); /* Update magic alias */
|
||||||
int magic_check(char *, char *); /* Check if magic alias exists */
|
int magic_check(char *, char *); /* Check if magic alias exists */
|
||||||
long magic_get(char *, long); /* Get fdb record for magic name */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -365,7 +365,6 @@ void Check(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strlen(fdb.Magic)) {
|
if (strlen(fdb.Magic)) {
|
||||||
Syslog('f', "Checking magic %s file %s", fdb.Magic, fdb.Name);
|
|
||||||
rc = magic_check(fdb.Magic, fdb.Name);
|
rc = magic_check(fdb.Magic, fdb.Name);
|
||||||
if (rc == -1) {
|
if (rc == -1) {
|
||||||
Syslog('+', "Area %d magic alias %s file %s is invalid", i, fdb.Magic, fdb.Name);
|
Syslog('+', "Area %d magic alias %s file %s is invalid", i, fdb.Magic, fdb.Name);
|
||||||
@ -468,7 +467,6 @@ void Check(void)
|
|||||||
if (file_exist(temp, X_OK) == 0) {
|
if (file_exist(temp, X_OK) == 0) {
|
||||||
Syslog('f', "%s is executable", temp);
|
Syslog('f', "%s is executable", temp);
|
||||||
} else if (file_exist(temp, R_OK) == 0) {
|
} else if (file_exist(temp, R_OK) == 0) {
|
||||||
Syslog('f', "%s is magic alias", temp);
|
|
||||||
if ((pFile = fopen(temp, "r"))) {
|
if ((pFile = fopen(temp, "r"))) {
|
||||||
fgets(mname, PATH_MAX -1, pFile);
|
fgets(mname, PATH_MAX -1, pFile);
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
|
Reference in New Issue
Block a user