コード例 #1
0
ファイル: ow_stats.c プロジェクト: stromnet/owfs
static ZERO_OR_ERROR FS_time(struct one_wire_query *owq)
{
	struct parsedname *pn = PN(owq);
	int dindex = pn->extension;
	struct timeval *tv;
	if (dindex < 0) {
		dindex = 0;
	}
	if (pn->selected_filetype == NO_FILETYPE) {
		return -ENOENT;
	}
	tv = (struct timeval *) pn->selected_filetype->data.v;
	if (tv == NULL) {
		return -ENOENT;
	}

	STATLOCK;
	OWQ_F(owq) = TVfloat( &(tv[dindex]) ) ;
	STATUNLOCK;
	return 0;
}
コード例 #2
0
ファイル: ow_interface.c プロジェクト: GrandHsu/iicontrollibs
static ZERO_OR_ERROR FS_bustime(struct one_wire_query *owq)
{
	OWQ_F(owq) = TVfloat( &(PN(owq)->selected_connection->bus_time) ) ;
	return 0;
}