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

Diff of /monit/validate.c

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

revision 1.86 by martinp, Sun Sep 7 20:55:24 2003 UTC revision 1.87 by martinp, Sun Sep 7 21:39:25 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    
   if(!DeviceInfo_Usage(s->devinfo, s->path)) {  
     Event_post(s, EVENT_START, "Event: unable to read device state\n");  
     return FALSE;  
   }  
   
432    if(stat(s->path, &stat_buf) != 0) {    if(stat(s->path, &stat_buf) != 0) {
433      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);
434      return FALSE;      return FALSE;
# Line 458  static int check_device(Service_T s) { Line 453  static int check_device(Service_T s) {
453        return FALSE;        return FALSE;
454    }    }
455    
456      if(!DeviceInfo_Usage(s->devinfo, s->path)) {
457        Event_post(s, EVENT_START, "Event: unable to read device state\n");
458        return FALSE;
459      }
460    
461    /* Test devices */    /* Test devices */
462    if(s->devicelist) {    if(s->devicelist) {
463      for(td= s->devicelist; td; td= td->next) {      for(td= s->devicelist; td; td= td->next) {

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

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