Re: [PATCH] Fix build w/o cgroups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One more comment on that. It's probably the time to think how to
refactor this code, because it's becoming very hard to navigate through
preprocessor macros' mess...

  Roman Bogorodskiy wrote:

> Build without cgroups support started to fail again recently. Do the
> following to fix it:
> 
>  - Add missing 'partition' arg that was added to the
>    virCgroupValidateMachineGroup() but forgotten for the stub
>    of the same function
>  - Add stubs for virCgroupMakeGroup() and virCgroupNew()
> ---
>  src/util/vircgroup.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
> index cfb4b3f..4cc7687 100644
> --- a/src/util/vircgroup.c
> +++ b/src/util/vircgroup.c
> @@ -174,6 +174,7 @@ static bool
>  virCgroupValidateMachineGroup(virCgroupPtr group ATTRIBUTE_UNUSED,
>                                const char *name ATTRIBUTE_UNUSED,
>                                const char *drivername ATTRIBUTE_UNUSED,
> +                              const char *partition ATTRIBUTE_UNUSED,
>                                bool stripEmulatorSuffix ATTRIBUTE_UNUSED)
>  {
>      return true;
> @@ -993,6 +994,23 @@ error:
>  
>      return -1;
>  }
> +#else
> +static int virCgroupMakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED,
> +                              virCgroupPtr group ATTRIBUTE_UNUSED,
> +                              bool create ATTRIBUTE_UNUSED,
> +                              unsigned int flags ATTRIBUTE_UNUSED)
> +{
> +    return -1;
> +}
> +
> +static int virCgroupNew(pid_t pid ATTRIBUTE_UNUSED,
> +                        const char *path ATTRIBUTE_UNUSED,
> +                        virCgroupPtr parent ATTRIBUTE_UNUSED,
> +                        int controllers ATTRIBUTE_UNUSED,
> +                        virCgroupPtr *group ATTRIBUTE_UNUSED)
> +{
> +    return -1;
> +}
>  #endif
>  
>  #if defined _DIRENT_HAVE_D_TYPE
> -- 
> 1.7.11.5
> 
Roman Bogorodskiy

Attachment: pgpHQTcKNOLsD.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]