Skip to content

Commit

Permalink
mount_flags.perf: add get_mount_flags_from_wordlist
Browse files Browse the repository at this point in the history
commit 366af73 added the function
directly to the generated file.  Add it to the .perf file as well so
it is added every time we generate the file.

Closes: containers#1253

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Aug 8, 2023
1 parent e2e7b62 commit f9f4e06
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/libcrun/mount_flags.perf
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,17 @@ libcrun_str2mount_flags (const char *name)
{
return libcrun_mount_flag_in_word_set (name, strlen (name));
}

const struct propagation_flags_s *
get_mount_flags_from_wordlist (void)
{
struct propagation_flags_s *flags;
size_t i;
size_t num_wordlist_flags = sizeof (wordlist) / sizeof (wordlist[0]);

flags = xmalloc0 ((sizeof (struct propagation_flags_s) + 1) * num_wordlist_flags);
for (i = 0; i < num_wordlist_flags; i++)
flags[i].name = wordlist[i].name;

return flags;
}

0 comments on commit f9f4e06

Please sign in to comment.