2010-08-17 05:33:07 +04:00
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2010-06-15 16:45:15 +04:00
2012-07-18 21:07:51 +04:00
# pragma once
2010-06-15 16:45:15 +04:00
/***
This file is part of systemd .
Copyright 2010 Lennart Poettering
systemd is free software ; you can redistribute it and / or modify it
2012-04-12 02:20:58 +04:00
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation ; either version 2.1 of the License , or
2010-06-15 16:45:15 +04:00
( at your option ) any later version .
systemd is distributed in the hope that it will be useful , but
WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
2012-04-12 02:20:58 +04:00
Lesser General Public License for more details .
2010-06-15 16:45:15 +04:00
2012-04-12 02:20:58 +04:00
You should have received a copy of the GNU Lesser General Public License
2010-06-15 16:45:15 +04:00
along with systemd ; If not , see < http : //www.gnu.org/licenses/>.
* * */
2014-06-27 20:12:07 +04:00
# include "macro.h"
2010-06-15 16:45:15 +04:00
typedef struct LookupPaths {
char * * unit_path ;
2010-09-21 07:23:12 +04:00
# ifdef HAVE_SYSV_COMPAT
2010-06-15 16:45:15 +04:00
char * * sysvinit_path ;
char * * sysvrcnd_path ;
2010-09-21 07:23:12 +04:00
# endif
2010-06-15 16:45:15 +04:00
} LookupPaths ;
2012-09-18 19:11:12 +04:00
typedef enum SystemdRunningAs {
SYSTEMD_SYSTEM ,
SYSTEMD_USER ,
_SYSTEMD_RUNNING_AS_MAX ,
_SYSTEMD_RUNNING_AS_INVALID = - 1
} SystemdRunningAs ;
2010-11-16 00:12:41 +03:00
int user_config_home ( char * * config_home ) ;
2014-09-29 01:54:25 +04:00
int user_runtime ( char * * user_runtime_path ) ;
2010-06-16 03:58:50 +04:00
2014-04-24 09:44:10 +04:00
int lookup_paths_init ( LookupPaths * p ,
SystemdRunningAs running_as ,
bool personal ,
const char * root_dir ,
const char * generator ,
const char * generator_early ,
const char * generator_late ) ;
2010-06-15 16:45:15 +04:00
void lookup_paths_free ( LookupPaths * p ) ;
2014-08-21 21:08:30 +04:00
# define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)