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; |
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", |