Lines Matching defs:path
16 char path[PATH_MAX];
24 const char *path)
27 tst_res_(__FILE__, lineno, TINFO | TERRNO, err, path);
29 tst_brk_(__FILE__, lineno, TBROK | TERRNO, err, path);
37 tst_res(TINFO, "%s = %s", i->path, i->value);
40 void tst_sys_conf_save_str(const char *path, const char *value)
44 strncpy(n->path, path, sizeof(n->path)-1);
47 n->path[sizeof(n->path) - 1] = 0;
61 if (!conf || !conf->path)
62 tst_brk(TBROK, "path is empty");
64 if (access(conf->path, F_OK) != 0) {
67 conf->path);
72 tst_brk(ttype | TERRNO, "Path not found: %s", conf->path);
75 if (access(conf->path, W_OK) != 0) {
78 conf->path);
83 tst_brk(ttype | TERRNO, "Path is not writable: %s", conf->path);
86 fp = fopen(conf->path, "r");
90 "Failed to open '%s' for reading", conf->path);
102 conf->path);
105 tst_sys_conf_save_str(conf->path, line);
110 fp = fopen(conf->path, "w");
114 "Failed to open '%s' for writing", conf->path);
122 "Failed to write into '%s'", conf->path);
129 "Failed to close '%s'", conf->path);
142 i->path, i->value);
144 FILE_PRINTF(i->path, "%s", i->value);