Skip to content
Snippets Groups Projects
Commit dbefc0db authored by root's avatar root
Browse files

fix check with -f options at writting time

parent 2a706e72
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,6 @@ int write_services(ssexec_t *info,sv_alltype *sv, char const *workdir, unsigned
{
int r ;
ss_resolve_t res = RESOLVE_ZERO ;
size_t workdirlen = strlen(workdir) ;
char *name = keep.s+sv->cname.name ;
size_t namelen = strlen(name) ;
......@@ -57,12 +55,15 @@ int write_services(ssexec_t *info,sv_alltype *sv, char const *workdir, unsigned
if (ss_resolve_check(info,name,SS_RESOLVE_LIVE))
{
ss_resolve_t res = RESOLVE_ZERO ;
stralloc sares = STRALLOC_ZERO ;
if (!ss_resolve_pointo(&sares,info,SS_NOTYPE,SS_RESOLVE_LIVE)) strerr_diefu1sys(111,"set revolve pointer to live") ;
if (!ss_resolve_read(&res,sares.s,name)) strerr_diefu2sys(111,"read resolve file of: ",name) ;
if (res.type != type) strerr_dief4x(111,"Detection of incompatible type format -- current: ",get_keybyid(type)," previous: ",get_keybyid(res.type)) ;
stralloc_free(&sares) ;
ss_resolve_free(&res) ;
}
ss_resolve_free(&res) ;
size_t wnamelen ;
char wname[workdirlen + SS_SVC_LEN + SS_SRC_LEN + namelen + 1 + 1] ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment