GNOME Bugzilla – Bug 726653
fixes/improvements to ifcfg-rh shvar code
Last modified: 2014-07-10 13:12:56 UTC
While looking at rh#1070617, I decided that svNewFile() should return a GError, so that when we failed to read a file, we could log the exact reason why. Then I realized that shvar.c was a complete disaster. See danw/shvar for fixes. (For comparison, the first commit in the branch is what I proposed for the downstream bug, though I guess there's no reason to commit it upstream since it gets undone by the last commit.)
> ifcfg-rh: syntactic code style fixes to shvar.[ch] > ifcfg-rh: rename svNewFile() to svOpenFile() Could you mention "trivial" in both commit messages? After looking at it, the commits seem really not to make any semantic changes whatsoever. > ifcfg-rh: clean up lowlevel ifcfg file reading code Make the EINTR line a separate patch that we might backport? Rest looks good!! Btw. could we also fixup the tab vs. whitespace one day? It is quite annoying to look at those files -- of course it's also annoying to do any backports later on :(
(In reply to comment #1) > Btw. could we also fixup the tab vs. whitespace one day? It is quite annoying > to look at those files -- of course it's also annoying to do any backports > later on :( The "syntactic" patch was supposed to completely fix up the whitespace in this file. Was there anything left wrong? Or did you mean fix it across the whole tree?
Ah ok. I didn't notice, because I watched it with git log -p --color-words=. Great then!!
(In reply to comment #1) > > ifcfg-rh: clean up lowlevel ifcfg file reading code > > Make the EINTR line a separate patch that we might backport? Well... there's no real reason to not backport the s->arena part too though; it's simple and obviously correct. I did change the commit message to emphasize the EINTR part more though, since that's actually a correctness fix. Re-pushed, with the commits reordered so that the possibly-backportable ones all come before the syntactic/semantic rewrites now. (This includes splitting out the g_ascii_strcasecmp() fix into its own commit.)
pushed
I just hit this in jhbuild: make[7]: Entering directory `/home/desrt/.cache/jhbuild/checkout/NetworkManager/src/settings/plugins/ifcfg-rh' CC writer.lo writer.c: In function 'write_ip4_aliases': writer.c:2230:3: error: too few arguments to function 'svWriteFile' svWriteFile (ifcfg, 0644);
fixed now. (i didn't try rebuilding after rebasing to master, and there was new code that needed updating)
this was fixed but never got closed...