|
From: Cerion Armour-B. <ce...@op...> - 2005-08-01 20:31:41
|
On Monday 01 August 2005 19:16, Dennis Lubert wrote:
> At 18:48 01.08.2005, Julian Seward wrote:
> > > The real problem here was not the ioctl, but the argument passing to
> > > the program. valkyrie passes the whole "Binary flags" option as *one*
> > > parameter to the program (one argv entry) which confuses
> > > getopt/getopt_long, so I got " eth1" instead of "eth1" which of cause
> > > confuses the ioctl, since there really is no such device... maybe this
> > > should be fixed to pass them the same way the shell does ?
> >
> >I can half-see what you are saying, but it would help a lot if
> >you could send a specific example of what flag(s) it is that
> >Valkyrie is passing incorrectly to Valgrind.
>
> I dont know how it is passing things to valgrind, but consider this little
> program :
>
>
> #include <iostream>
>
> using namespace std;
>
> int main ( int argc, char* argv[] )
> {
> cout << argc << " Arguments" << endl;
> char** arg = & argv[0];
> while( *arg )
> {
> cout << "\"" << *arg << "\"" << endl;
> arg++;
> }
> }
>
> Running standalon or with valgrind : ./argtest -i eth1
> =output=
> 3 Arguments
> "./argtest"
> "-i"
> "eth1"
>
> but from within valkyrie (Setting the Binary flags option)
> =output=
> 2 Arguments
> "/home/plasmahh/argtest"
> "-i eth1"
>
> things like getopt etc. seem to rely on tokens seperatable by whitespace
> beeing in a distinc argv entry
>
Absolutely right. Fixed.
Can you confirm this fixes your ioctl problem?
Thanks,
Cerion.
|