/[monit]/monit/validate.c
ViewVC logotype

Diff of /monit/validate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.85 by hauk, Sun Sep 7 18:46:25 2003 UTC revision 1.86 by martinp, Sun Sep 7 20:55:24 2003 UTC
# Line 429  static int check_device(Service_T s) { Line 429  static int check_device(Service_T s) {
429    struct stat stat_buf;    struct stat stat_buf;
430    char report[STRLEN]= {0};    char report[STRLEN]= {0};
431    
432      if(!DeviceInfo_Usage(s->devinfo, s->path)) {
433        Event_post(s, EVENT_START, "Event: unable to read device state\n");
434        return FALSE;
435      }
436    
437    if(stat(s->path, &stat_buf) != 0) {    if(stat(s->path, &stat_buf) != 0) {
438      Event_post(s, EVENT_START, "Event: device '%s' doesn't exist\n", s->name);      Event_post(s, EVENT_START, "Event: device '%s' doesn't exist\n", s->name);
439      return FALSE;      return FALSE;
# Line 455  static int check_device(Service_T s) { Line 460  static int check_device(Service_T s) {
460    
461    /* Test devices */    /* Test devices */
462    if(s->devicelist) {    if(s->devicelist) {
     if(!DeviceInfo_Usage(s->devinfo, s->path)) {  
       Event_post(s, EVENT_START, "Event: unable to read device state\n");  
       return FALSE;  
     }  
463      for(td= s->devicelist; td; td= td->next) {      for(td= s->devicelist; td; td= td->next) {
464        if(!check_device_resources(s, td, report)) {        if(!check_device_resources(s, td, report)) {
465          if (! eval_actions(td->action, s, report, "device",          if (! eval_actions(td->action, s, report, "device",

Legend:
Removed from v.1.85  
changed lines
  Added in v.1.86

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26