On Wed, Jul 25, 2012 at 4:37 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote: > 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 As I did, we have: # osinfo-install-script --output-dir OUTPUT-DIR --output-file FILENAME OSNAME we agreed in remove --output-file, right? about output dir i'm working in this way: if OUTPUT-DIR is passed, the path will be OUTPUT-DIR, else, the path will be "." do you agree with this behavior? > >> >> @@ -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. yeah, you're right. I was supposing that callback passed to this function should use the output-dir I'll think in a correct way to implement it. > > 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 :| -- Fabiano Fidêncio