Changed un_attach function

This commit is contained in:
Michiel Broek 2004-07-24 18:58:14 +00:00
parent 14e6739d68
commit 5963f66cb1
2 changed files with 4 additions and 9 deletions

View File

@ -57,10 +57,7 @@ int attach(faddr noden, char *ofile, int mode, char flavor, int fdn)
/* /*
* Check if we attach a file with the same name * Check if we attach a file with the same name
*/ */
if ((fdn) && (un_attach(&noden, ofile) == FALSE)) { un_attach(&noden, ofile, fdn);
WriteError("attach: can't un_attach %s, %s", ofile, strerror(rc));
return FALSE;
}
flofile = calloc(PATH_MAX, sizeof(char)); flofile = calloc(PATH_MAX, sizeof(char));
thefile = calloc(PATH_MAX, sizeof(char)); thefile = calloc(PATH_MAX, sizeof(char));
@ -226,14 +223,12 @@ int check_flo(faddr *node, char *filename, char flavor)
/* /*
* Remove a file from the flofile, also search for a .tic file. * Remove a file from the flofile, also search for a .tic file.
*/ */
int un_attach(faddr *node, char *filename) void un_attach(faddr *node, char *filename, int fdn)
{ {
Syslog('p', "un_attach: %s %s", ascfnode(node, 0x1f), filename); Syslog('p', "un_attach: %s %s %s", ascfnode(node, 0x1f), filename, fdn ?"FDN":"NOR");
if (check_flo(node, filename, 'h') == 0) if (check_flo(node, filename, 'h') == 0)
if (check_flo(node, filename, 'f') == 0) if (check_flo(node, filename, 'f') == 0)
check_flo(node, filename, 'c'); check_flo(node, filename, 'c');
return TRUE;
} }

View File

@ -2115,7 +2115,7 @@ int le_int(int);
* From attach.c * From attach.c
*/ */
int attach(faddr, char *, int, char, int); int attach(faddr, char *, int, char, int);
int un_attach(faddr *, char *); void un_attach(faddr *, char *, int);