---
name: "ts_conf_set"
section: "3"
platform: "linux"
package: "tslib"
version: "1.24-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ts_conf_set"
---

# ts\_conf\_set(3)

write a new TSLIB\_CONFFILE config file and reload it.

## NAME

ts\_conf\_set - write a new TSLIB\_CONFFILE config file and reload it.

## SYNOPSIS

```
#include <tslib.h>

int ts_conf_set(struct ts_module_conf *conf);

```

## DESCRIPTION

**ts\_conf\_set**() This function takes a pointer to a struct ts\_module\_conf. It reads data from all linked structs in the list (next and prev pointers) and writes a new TSLIB\_CONFFILE. The first struct in the list (where prev is NULL) is the first line and so on. After writing, ts\_reconfig() has to be called so the new modules and parameters are reloaded and applied to the currently running program.

The given set of ts\_module\_conf structs is freed and destroyed here. After calling ts\_conf\_set() one has to use ts\_conf\_get() again, for a different change.

```
struct ts_module_conf {
	char *name;
	char *params;
	int raw;
	int nr;
	struct ts_module_conf *next;
	struct ts_module_conf *prev;
};
```

## RETURN VALUE

This function returns zero on success and a negative integer on failure.

## SEE ALSO

[**ts\_conf\_get**(3)](/ts_conf_get/3.md), [**ts\_config**(3)](/ts_config/3.md), [**ts.conf**(5)](/ts.conf/5.md)
