Exemple #1
0
void device_probe_name(struct device *device, int probenum, char *name)
{
	struct probe *p;

	p = probe_find(device, probenum);
	if (!p)
		return;

	if (p->name)
		g_free(p->name);
	p->name = g_strdup(name);
}
Exemple #2
0
void device_probe_clear(struct device *device, int probenum)
{
	struct probe *p;

	p = probe_find(device, probenum);
	if (!p)
		return;

	if (p->name) {
		g_free(p->name);
		p->name = NULL;
	}
}
Exemple #3
0
void device_trigger_set(struct device *device, int probenum, char *trigger)
{
	struct probe *p;

	p = probe_find(device, probenum);
	if(!p)
		return;

	if(p->trigger)
		g_free(p->trigger);

	p->trigger = g_strdup(trigger);

}
Exemple #4
0
void device_trigger_clear(struct device *device)
{
	struct probe *p;
	int probenum;

	if(device->probes)
		for(probenum = 1; probenum <= g_slist_length(device->probes); probenum++)
		{
			p = probe_find(device, probenum);
			if(p && p->trigger)
			{
				g_free(p->trigger);
				p->trigger = NULL;
			}
		}

}