Preparations for the ICM nodelist flag (FSP-1033)

This commit is contained in:
Michiel Broek
2004-06-06 18:52:23 +00:00
parent 0c5338827d
commit 6821fd7c44
3 changed files with 22 additions and 5 deletions

View File

@@ -1097,7 +1097,7 @@ node *getnlent(faddr *addr)
// moflags(nodebuf.mflags);
// diflags(nodebuf.dflags);
// ipflags(nodebuf.iflags);
// olflags(nodebuf.oflags);
olflags(nodebuf.oflags);
// rqflags(nodebuf.xflags);
free(mydomain);
@@ -1228,15 +1228,21 @@ void ipflags(unsigned long flags)
unsigned long getCMmask(void)
{
nodelist_flag **tmpm;
nodelist_flag **tmpm;
static unsigned long mask = 0L;
for (tmpm = &nl_online; *tmpm; tmpm=&((*tmpm)->next)) {
if (strcmp("CM", (*tmpm)->name) == 0) {
return (*tmpm)->value;
mask &= (*tmpm)->value;
}
if (strcmp("ICM", (*tmpm)->name) == 0) {
mask &= (*tmpm)->value;
}
}
if (mask)
return mask;
WriteError("CM mask not found in %s/etc/nodelist.conf", getenv("MBSE_ROOT"));
WriteError("CM and ICM mask not found in %s/etc/nodelist.conf", getenv("MBSE_ROOT"));
return 0;
}