Bug 113 - Driver scan() should be able to return an error code
Summary: Driver scan() should be able to return an error code
Status: CONFIRMED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: API (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 12:16 CEST by Bert Vermeulen
Modified: 2013-04-29 12:16 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bert Vermeulen 2013-04-29 12:16:28 CEST
The prototype for scan() should be:

int (*scan) (GSList *options, GSList **devices);

This will enable us to not only bring the function in line with the rest of libsigrok wrt error reporting, but also allow us to return a (new) error code: SR_ERR_CONN_REQUIRED. We need this because drivers like the OLS don't do any scanning unless fed a serial port, but have no way to signal this to the frontend.