Quoting Andrew Gilbert (andrewg...@gmail.com): > Regarding the second patch, my thought is that if a user forgets the > '--', the current behaviour will either crash as described in my bug > report, or try to use the following arguments as the name of the > container to open. That is, I believe that > > lxc-netstat -n <container-name> -n -a > > will result in trying to do netstat on container "-a". I think my > patch brings lxc-netstat's behaviour into a more consistent form, > given that it seems > > lxc-netstat -n <container-name> -a -n > > will result in calling netstat on container-name with "-a -n" as the > arguments (see the last line of the case statement; line 81 of the > unpatched source). The behaviour currently depends on the order of > the arguments, as far as I can tell. > > Perhaps a better approach would be to consistently die cleanly if no > -- is provided, unless there are no further arguments? Or maybe it > doesn't matter if behaviour is undefined under these circumstances.
Ok - I don't like implied semantics in general, but since lxc-netstat itself *only* accepts a -n, your patch does seem best. Thanks! ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel