Changeset 666f3b3ec6db879445b66943258a56a195e0af41

Show
Ignore:
Timestamp:
02/13/08 02:59:06 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1202871546 +0000
git-parent:

[7a1324aa50711b4d7f5d81f7e901081a150cf9fe]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1202871546 +0000
Message:

no cd into checks and fix prompt len

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_conf.c

    r7a1324a r666f3b3  
    345345 
    346346  node = (noit_conf_section_t)xmlXPathNodeSetItem(pobj->nodesetval, 0); 
     347  if(!strcmp((char *)node->name, "check")) { 
     348    err = "can't cd into a check, use 'check' instead"; 
     349    goto bad; 
     350  } 
    347351  path = (char *)xmlGetNodePath(node); 
    348352  if(strncmp(path, "/noit/", strlen("/noit/")) && strcmp(path, "/noit")) { 
     
    507511 
    508512  path_len = strlen(info->path); 
    509   max_len = strlen(pfmt) - 4 /* %s%s */ - 1 /* \0 */; 
     513  max_len = sizeof(info->prompt) - (strlen(pfmt) - 4 /* %s%s */) - 1 /* \0 */; 
    510514  if(path_len > max_len) 
    511515    snprintf(info->prompt, sizeof(info->prompt),