On Fri, Sep 10, 2021 at 01:49:22PM +0200, Michal Prívozník wrote: > On 9/9/21 6:13 PM, Pavel Hrdina wrote: > > With introduction of live changes of appid we should also support > > removal of the appid from VM. This is done by writing empty appid part > > to appid_store file. > > > > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> > > --- > > src/util/vircgroup.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c > > index ad0ee20862..9470ab061d 100644 > > --- a/src/util/vircgroup.c > > +++ b/src/util/vircgroup.c > > @@ -4026,7 +4026,7 @@ virCgroupSetFCAppid(virCgroup *group, > > if (inode < 0) > > return -1; > > > > - vmid = g_strdup_printf("%X:%s", inode, appid); > > + vmid = g_strdup_printf("%X:%s", inode, appid ? appid : ""); > > Or NULLSTR_EMPTY(appid) instead of ternary operator. Nice :) didn't know we have a helper for that. Pavel
Attachment:
signature.asc
Description: PGP signature