[Goodies-dev] [Bug 9076] [PATCH] Run command to return network device to listen to

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Tue Jul 10 19:46:15 CEST 2012


https://bugzilla.xfce.org/show_bug.cgi?id=9076

--- Comment #2 from Miguel Guedes <miguel.a.guedes at gmail.com> ---
Hi Mike,

>> /* What is the XFCE way of dealing with null pointers */
> => There is no Xfce way, it's just C code.

Understood. I'm new to XFCE (and Open Source) development and just didn't know
whether you guys had your own guidelines/standards.

> Second about know the purpose of this patch.
> 
> The sanitizing part will only work for commands that return exactly what is
> expected. The sanitizing part fails in case the output doesn't end with a new 
> line (\n). 

The sanitizing bit doesn't fail per se, as it is only supposed to remove the
first occurring newline char. See below.

> Can you cite a command that works for this patch? I don't see ip nor 
> ipconfig as an example. This may mean that the user needs to craft his own 
> script, which defeats the purpose of an option.

Can't cite a command that works as probably there isn't one but I've attached
one I've created myself. The script is simple and all it does is look to see
whether the eth0 interface is up and an IP is assigned, in which case it
echo(es) 'eth0', otherwise echo(es) 'wlan0'. Now, this is where the sanitizing
bit comes into play as 'echo' always appends a newline char unless 'echo -n' is
used. In the former case, a way of removing newline chars is needed or the
interface name will contain the newline char and the plugin will consequently
fail to retrieve information about the intended interface.

> 
> As a user it's impossible to guess what this new option is about.

I believe this option is more aimed at power users, especially those on the
move who use different network interfaces depending on the circumstances. The
user is free to create a script that works for his/her needs and instructs
netload to monitor the intended interface without the user having to manually
setup the plugin each time a different interface is used.

I agree, though, that perhaps a tooltip should be added containing a brief,
objective explanation as to what the command does. However, I've made the
network interface field (in the configuration box) toggle between
enabled/disabled state, depending on whether run-command is enabled, as a sort
of hint as to what run-command does. 

> 
> Finally it's merely a duplicate of bug 3880, or bug 7431.
> 
> Your way of trying to discover the interface is not good enough, and is therefore rejected.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the Goodies-dev mailing list