aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs6rc/s6rc_repo_list_sets.c
blob: 99f216283ac734ebbb340fe59342c2ca208eae84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ISC license. */

#include <string.h>

#include <s6-rc/s6rc-utils.h>
#include <s6-rc/repo.h>

int s6rc_repo_list_sets (char const *repo, stralloc *sa, genalloc *ga)
{
  size_t repolen = strlen(repo) ;
  char fn[repolen + 9] ;
  memcpy(fn, repo, repolen) ;
  memcpy(fn + repolen, "/sources", 9) ;
  return s6rc_ls(fn, sa, ga) ;
}