summaryrefslogtreecommitdiff
path: root/src/libenvexec/envdir.c
blob: be8867a943777392dee33b18f76c470127bd74f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <errno.h>

#include <skalibs/env.h>
#include "envdir-internal.h"

int envdir_internal (char const *path, stralloc *modifs, unsigned int options, char nullis)
{
  return nullis ? options & SKALIBS_ENVDIR_NOCLAMP ?
    envdir_internal_noclamp(path, modifs, options & ~SKALIBS_ENVDIR_NOCLAMP, nullis) :
    envdir_internal_clamp(path, modifs, options, nullis) : (errno = EINVAL, -1) ;
}