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; |
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) { |