Re: [patch 5/7] Cleanup configDir members

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

 



On Tue, Feb 20, 2007 at 07:26:39PM +0000, Mark McLoughlin wrote:
> server->autostartNetworkConfigDir etc. is starting to
> get a little unwieldly so put the config directory
> paths in an array.
 
> +    const char *paths[] = {
> +        "libvirt/qemu",                    /* QEMUD_DIR_DOMAINS */
> +        "libvirt/qemu/autostart",          /* QEMUD_DIR_AUTO_DOMAINS */
> +        "libvirt/qemu/networks",           /* QEMUD_DIR_NETWORKS */
> +        "libvirt/qemu/networks/autostart", /* QEMUD_DIR_AUTO_NETWORKS */
> +    };
> +
  
  
> -        if (snprintf(autostartNetworkConfigDir, maxlen, "%s/.libvirt/qemu/networks/autostart", pw->pw_dir) >= maxlen)
> -            goto snprintf_error;
> +        base = pw->pw_dir;
> +    }
>  
> -        if (snprintf(sockname, maxlen, "@%s/.libvirt/qemud-sock", pw->pw_dir) >= maxlen)
> +    for (i = 0; i < QEMUD_N_CONFIG_DIRS; i++)
> +        if (snprintf(server->configDirs[i], PATH_MAX, "%s/%s", base, paths[i]) >= PATH_MAX)
>              goto snprintf_error;
> -    }

I could be reading this wrong, but it looks as if this is going to make the
per-user daemon write its config files into

  $HOME/libvirt 

Instead of

  $HOME/.libvirt

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


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