Completed mbtask new disk watcher

This commit is contained in:
Michiel Broek
2004-03-20 23:00:22 +00:00
parent f2a5b62745
commit f55ff6280f
33 changed files with 132 additions and 126 deletions

View File

@@ -162,6 +162,7 @@ void CloseFilearea(int force)
unlink(fout);
chmod(fin, 0640);
Syslog('+', "Updated \"fareas.data\"");
disk_reset();
if (!force)
working(6, 0, 0);
return;

View File

@@ -197,6 +197,7 @@ void CloseFGroup(int force)
fclose(fo);
unlink(fout);
chmod(fin, 0640);
disk_reset();
Syslog('+', "Updated \"fgroups.data\"");
if (!force)
working(6, 0, 0);

View File

@@ -1476,6 +1476,7 @@ void global_menu(void)
if (crc != crc1) {
if (yes_no((char *)"Configuration is changed, save") == 1) {
cf_close();
disk_reset();
Syslog('+', "Saved main config");
working(6, 0, 0);
}

View File

@@ -183,6 +183,7 @@ void CloseHatch(int force)
fclose(fo);
unlink(fout);
chmod(fin, 0640);
disk_reset();
Syslog('+', "Updated \"hatch.data\"");
if (!force)
working(6, 0, 0);

View File

@@ -239,6 +239,7 @@ void CloseLanguage(int force)
tidy_stlist(&lan);
chmod(fin, 0640);
Syslog('+', "Updated \"language.data\"");
disk_reset();
if (!force)
working(6, 0, 0);
return;

View File

@@ -174,6 +174,7 @@ void CloseMagics(int force)
tidy_stlist(&mag);
unlink(fout);
chmod(fin, 0640);
disk_reset();
Syslog('+', "Updated \"magic.data\"");
if (!force)
working(6, 0, 0);

View File

@@ -270,6 +270,7 @@ void CloseMsgarea(int Force)
unlink(fout);
chmod(fin, 0660);
Syslog('+', "Updated \"mareas.data\"");
disk_reset();
if (!Force)
working(6, 0, 0);
return;

View File

@@ -206,6 +206,7 @@ void CloseMGroup(int force)
fclose(fo);
unlink(fout);
chmod(fin, 0640);
disk_reset();
Syslog('+', "Updated \"mgroups.data\"");
if (!force)
working(6, 0, 0);

View File

@@ -259,6 +259,7 @@ void CloseNoderec(int Force)
free(fin);
free(fout);
Syslog('+', "Updated \"nodes.data\"");
disk_reset();
CreateSema((char *)"scanout");
working(6, 0, 0);
return;

View File

@@ -136,3 +136,9 @@ void addtoc(FILE *fp, FILE *toc, int chapt, int par, int page, char *title)
void disk_reset(void)
{
SockS("DRES:0;");
}

View File

@@ -1,10 +1,12 @@
#ifndef _MUTIL_H
#define _MUTIL_H
/* $Id$ */
unsigned char readkey(int, int, int, int);
unsigned char testkey(int, int);
int newpage(FILE *, int);
void addtoc(FILE *, FILE *, int, int, int, char *);
void disk_reset(void);
#endif