[zypp-commit] r11562 - /trunk/sat-solver/tools/rpmdb2solv.c
Author: mlschroe Date: Fri Oct 31 16:12:00 2008 New Revision: 11562 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11562&view=rev Log: - add '-o <outfile>' support Modified: trunk/sat-solver/tools/rpmdb2solv.c Modified: trunk/sat-solver/tools/rpmdb2solv.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/rpmdb2solv.c?rev=11562&r1=11561&r2=11562&view=diff ============================================================================== --- trunk/sat-solver/tools/rpmdb2solv.c (original) +++ trunk/sat-solver/tools/rpmdb2solv.c Fri Oct 31 16:12:00 2008 @@ -60,12 +60,13 @@ const char *basefile = 0; char *proddir = 0; const char *attribute = 0; + char *outfile = 0; /* * parse arguments */ - while ((c = getopt(argc, argv, "Pa:hnxb:r:p:")) >= 0) + while ((c = getopt(argc, argv, "Pa:hnxb:r:p:o:")) >= 0) switch (c) { case 'h': @@ -92,10 +93,19 @@ case 'x': extrapool = 1; break; + case 'o': + outfile = optarg; + break; default: usage(1); } + if (outfile && !freopen(outfile, "w", stdout)) + { + perror(outfile); + exit(1); + } + /* * ??? */ -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
mlschroe@svn.opensuse.org