On Wed, Jul 25, 2012 at 04:27:01PM +0200, Fabiano Fidêncio wrote: > On Wed, Jul 25, 2012 at 3:14 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote: > > > >> If the dirname argument is NULL, the output files will be written in the > >> current directory. > > > > I think we could probably just make that an parameter flag > > instead eg. > > > > # osinfo-install-script --output-dir /some/dir win2k3r2 > > > > eorry, i didn't understand your point. > could you try to clarify it a bit more for me? IIUC, currently you have output dir as a parameter # osinfo-install-script OSNAME FILENAME OUTPUT-DIR I'm suggesting using a flag # osinfo-install-script --output-dir OUTPUT-DIR OSNAME > >> @@ -686,6 +737,136 @@ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, > >> return data.output; > >> } > >> > >> +void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, > >> + OsinfoOs *os, > >> + OsinfoInstallConfig *config, > >> + GFile *output_dir, > > > > This parameter appears to be ignored in this method which is strange ? > > it's not so strange and i can explain why. > GOutputFile is used in the callback. Here, I just call the old > function to generate the script and, in the callback, I'll write the > script in the file. Makes sense? Still not clear? What you describe cannot work, because nothing in this method ever references the 'output_dir' parameter address. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|