main: remove obsolete compat_deletions

This commit is contained in:
Thomas Schoebel-Theuer 2022-07-03 20:54:11 +02:00 committed by Thomas Schoebel-Theuer
parent 9f0a53487e
commit 8e63032af3
1 changed files with 7 additions and 28 deletions

View File

@ -328,17 +328,15 @@ void _show_vals(struct key_value_pair *start,
start->old_val = NULL; start->old_val = NULL;
} }
if (silent) { if (silent) {
const char *check = ordered_readlink(dst, NULL);
bool gone = (!check || !*check);
brick_string_free(check);
brick_string_free(start->val); brick_string_free(start->val);
/* remove old message with minimum update frequency */ /* remove old message with minimum update frequency */
if (!compat_deletions) { if (gone)
const char *check = ordered_readlink(dst, NULL); ordered_symlink(MARS_DELETED_STR, dst, NULL);
bool gone = (!check || !*check); goto done;
brick_string_free(check);
if (gone)
ordered_symlink(MARS_DELETED_STR, dst, NULL);
goto done;
}
} }
if (start->val) { if (start->val) {
char *src = path_make("%lld.%09ld %lld.%09ld %s", char *src = path_make("%lld.%09ld %lld.%09ld %s",
@ -738,7 +736,6 @@ enum {
// replacement for DNS in kernelspace // replacement for DNS in kernelspace
CL_IPS, CL_IPS,
CL_GBL_ACTUAL, CL_GBL_ACTUAL,
CL_COMPAT_DELETIONS, /* transient, to re-disappear */
// resource definitions // resource definitions
CL_RESOURCE, CL_RESOURCE,
/* subdir items */ /* subdir items */
@ -6991,15 +6988,6 @@ static int check_deleted(struct mars_dent *dent)
return 0; return 0;
} }
/* transient, to re-disappear */
static
int get_compat_deletions(struct mars_dent *dent)
{
if (dent && dent->new_link)
sscanf(dent->new_link, "%d", &compat_deletions);
return 0;
}
static static
int make_res(struct mars_dent *dent) int make_res(struct mars_dent *dent)
{ {
@ -7215,15 +7203,6 @@ static const struct main_class main_classes[] = {
.cl_hostcontext = false, .cl_hostcontext = false,
.cl_father = CL_ROOT, .cl_father = CL_ROOT,
}, },
/* transient, to re-disappear */
[CL_COMPAT_DELETIONS] = {
.cl_name = "compat-deletions",
.cl_len = 16,
.cl_type = 'l',
.cl_hostcontext = false,
.cl_father = CL_ROOT,
.cl_forward = get_compat_deletions,
},
/* Directory containing all items of a resource /* Directory containing all items of a resource
*/ */