Re: [PATCH v3 4/5] utils: Use overrides in virFileIsSharedFS()

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

 



On Thu, May 09, 2024 at 14:28:15 +0200, Peter Krempa wrote:
> On Thu, May 02, 2024 at 19:39:41 +0200, Andrea Bolognani wrote:

[...]

> foreach override in overrides:
> 
>   pc = canonicalize(path);
>   po = canonicalize(override);
> 
>   if (STRPREFIX(pc, po))
>     return true;
> 
> Checking the full prefix on canonicalized paths is IIUC equivalent to
> what you do below. (Okay perhaps except the case when user declares a
> full to a single file as an exported override).

To take the above into account we can perhaps do STRSKIP:

   if ((tmp = STRSKIP(pc, po))) {
       if (*tmp == '/' || *tmp == '\0)
          return true;
   }
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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]

  Powered by Linux