Lines Matching defs:repo
1 /* $OpenBSD: repo.c,v 1.71 2024/12/19 13:23:38 job Exp $ */
90 struct repo {
91 SLIST_ENTRY(repo) entry;
98 struct entityq queue; /* files waiting for repo */
107 static SLIST_HEAD(, repo) repos = SLIST_HEAD_INITIALIZER(repos);
109 /* counter for unique repo id */
293 repo_state(const struct repo *rp)
312 struct repo *rp;
336 * Build TA file name based on the repo info.
408 /* no need to look for possible other repo */
468 char *repo;
470 if ((repo = rsync_base_uri(uri)) == NULL)
474 if (strcmp(rr->repouri, repo) == 0) {
475 free(repo);
485 rr->repouri = repo;
486 rr->basedir = repo_dir(repo, ".rsync", 0);
548 * Build RRDP state file name based on the repo info.
595 static struct repo *
598 struct repo *rp;
617 struct repo *rp;
631 static struct repo *
634 struct repo *rp;
772 errx(1, "non-existent rrdp repo %u", id);
913 * Remove RRDP repo and start over.
922 errx(1, "non-existent rrdp repo %u", id);
932 * Returns 1 on success, 0 if the repo is corrupt, -1 on IO error
947 errx(1, "non-existent rrdp repo %u", id);
957 /* try to open file first in rrdp then in valid repo */
1055 errx(1, "unknown rsync repo %u", id);
1069 /* clear rsync repo since it failed */
1086 errx(1, "unknown RRDP repo %u", id);
1100 /* clear the RRDP repo since it failed */
1148 struct repo *
1151 struct repo *rp;
1190 struct repo *
1193 struct repo *rp;
1210 /* found matching repo */
1255 struct repo *
1258 struct repo *rp;
1267 static struct repo *
1270 struct repo *rp;
1284 static struct repo *
1287 struct repo *rp;
1301 repo_basedir(const struct repo *rp, int wantvalid)
1315 path = NULL; /* only valid repo available */
1328 repo_id(const struct repo *rp)
1337 repo_uri(const struct repo *rp)
1346 repo_fetch_uris(const struct repo *rp, const char **carepo,
1357 repo_synced(const struct repo *rp)
1370 repo_proto(const struct repo *rp)
1391 repo_talid(const struct repo *rp)
1397 repo_queued(struct repo *rp, struct entity *p)
1407 repo_fail(struct repo *rp)
1419 errx(1, "%s: bad repo", rp->repouri);
1423 repo_abort(struct repo *rp)
1442 struct repo *rp;
1481 * Update repo-specific stats when files are going to be moved
1485 repostats_new_files_inc(struct repo *rp, const char *file)
1496 repo_stat_inc(struct repo *rp, int talid, enum rtype type, enum stype subtype)
1613 repo_tal_stats_collect(void (*cb)(const struct repo *,
1616 struct repo *rp;
1625 repo_stats_collect(void (*cb)(const struct repo *, const struct repostats *,
1628 struct repo *rp;
1642 struct repo *rp;
1658 /* try to remove file from rrdp repo ... */
1779 struct repo *rp;
1783 repo_is_rrdp(struct repo *rp)
1983 struct repo *rp;