Пример #1
0
char *
syi_HostSpec (
  pwr_tStatus *status,
  char *ibuffer,
  int size
)
{

  return syi_NodeSpec(status, ibuffer, size);
}
Пример #2
0
char *ini_LoadDirectory (
  pwr_tStatus	*status,
  ini_sContext *cp
)
{
  pwr_dStatus(sts, status, INI__SUCCESS);

  if (!cp->flags.b.nodename)
    syi_NodeName(sts, cp->nodename, sizeof(cp->nodename));
  if (!cp->flags.b.hostname)
    syi_HostName(sts, cp->hostname, sizeof(cp->hostname));

  syi_NodeSpec(sts, cp->nodespec, sizeof(cp->nodespec));
  syi_HostSpec(sts, cp->hostspec, sizeof(cp->hostspec));
  syi_BootDisk(sts, cp->bootdisk, sizeof(cp->bootdisk));

  {
    char *s;

    if ((s = getenv(dbs_cNameBaseDirectory)) != NULL)
      sprintf(cp->bdir, "%s/", s);
    else
      errh_LogError(&cp->log, "Environment variable '%s' is not defined", dbs_cNameBaseDirectory);

    if ((s = getenv(dbs_cNameDirectory)) != NULL)
      sprintf(cp->dir, "%s/", s);
    else
      errh_LogError(&cp->log, "Environment variable '%s' is not defined", dbs_cNameDirectory);

    if (!cp->flags.b.busid) {
      s = getenv(pwr_dEnvBusId);
      if (s != NULL)

	cp->busid = atoi(s);
    }
  }

  return cp->dir;
}