Updates for diskwatcher

This commit is contained in:
Michiel Broek
2004-03-21 12:55:45 +00:00
parent f55ff6280f
commit f10a39a9e7
17 changed files with 67 additions and 82 deletions

View File

@@ -143,10 +143,8 @@ int main(int argc, char **argv)
if (!do_quiet)
printf("\n");
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (lockprogram((char *)"mbaff")) {
if (!do_quiet)

View File

@@ -167,10 +167,8 @@ int main(int argc, char **argv)
printf("\n");
}
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
/*
* Extract work directory from the first commandline parameter

View File

@@ -424,10 +424,8 @@ int main(int argc, char **argv)
/*
* Not yet locked, if anything goes wrong, exit with die(MBERR_NO_PROGLOCK)
*/
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (do_mail) {
/*

View File

@@ -234,10 +234,8 @@ int main(int argc, char **argv)
if (!do_quiet)
printf("\n");
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (lockprogram((char *)"mbfile")) {
if (!do_quiet)

View File

@@ -173,10 +173,8 @@ void ImportFiles(int Area)
/*
* Check diskspace
*/
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
Files++;
memset(&f_db, 0, sizeof(f_db));

View File

@@ -358,10 +358,8 @@ void ReqIndex(void)
if (area.Available) {
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (!do_quiet) {
printf("\r%4ld => %-44s \b\b\b\b", i, area.Name);
@@ -599,10 +597,8 @@ void HtmlIndex(char *Lang)
if (area.Available) {
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (!do_quiet) {
printf("\r%4ld => %-44s \b\b\b\b", i, area.Name);

View File

@@ -86,10 +86,8 @@ void Kill(void)
if ((area.Available) && (area.DLdays || area.FDdays) && (!area.CDrom)) {
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (!do_quiet) {
printf("\r%4d => %-44s \b\b\b\b", i, area.Name);

View File

@@ -79,10 +79,8 @@ void PackFileBase(void)
if (area.Available && !area.CDrom) {
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (!do_quiet) {
printf("\r%4d => %-44s", i, area.Name);

View File

@@ -158,10 +158,8 @@ void SortFileBase(int Area)
if (area.Available) {
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (!do_quiet) {
printf("Sorting area %d: %-44s", Area, area.Name);

View File

@@ -177,10 +177,8 @@ int main(int argc,char *argv[])
Syslog(' ', cmd);
free(cmd);
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (lockprogram((char *)"mbindex")) {
if (!do_quiet)

View File

@@ -277,10 +277,8 @@ void DoMsgBase()
fread(&msgs, msgshdr.recsize, 1, pAreas);
if (msgs.Active) {
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
if (!do_quiet) {
colour(3, 0);
@@ -308,10 +306,8 @@ void DoMsgBase()
arearec++;
if (msgs.Active) {
if (enoughspace(CFG.freespace) == 0) {
Syslog('+', "Low diskspace, abort");
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);
}
Nopper();
if (!do_quiet) {