[libvirt] [PATCH 2/6] Add DBus helper methods for creating reply messages

Daniel P. Berrange berrange at redhat.com
Fri Mar 21 10:51:58 UTC 2014


On Thu, Mar 20, 2014 at 11:39:18AM -0600, Eric Blake wrote:
> On 03/20/2014 11:28 AM, Daniel P. Berrange wrote:
> > On Thu, Mar 20, 2014 at 06:16:08PM +0100, Michal Privoznik wrote:
> >> On 20.03.2014 13:28, Daniel P. Berrange wrote:
> >>> The test suites often have to create DBus method reply messages
> >>> with payloads. Create two helpers for simplifying the process
> >>> of creating replies with payloads.
> >>>
> >>> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> >>> ---
> >>>  src/libvirt_private.syms |  2 ++
> >>>  src/util/virdbus.c       | 60 ++++++++++++++++++++++++++++++++++++++++++++++++
> >>>  src/util/virdbus.h       |  5 ++++
> >>>  3 files changed, 67 insertions(+)
> > 
> > 
> >>> +    ret = 0;
> >>> + cleanup:
> >>
> >> Indentation's off.
> > 
> > Do we actually have an indentation rule for labels ? 
> 
> Most code starts it in the first column, with no leading space.
> 
> In some respects, emacs doesn't handle it well (it assumes anything in
> the first column is a function name, so it tries to treat the label as a
> function name when generating changelog templates); on the other hand,
> when I hit TAB on a label, emacs reindents it to the first column (that
> is, our .dir-locals.el requests c-file-style "K&R", and apparently that
> style includes putting labels at one indentation layer less than the
> rest of the code; so if you are labelling something that indents four
> spaces, the label gets indented 0 spaces).
> 
> I've been going by the general rule of thumb that if emacs reindents
> something, then my style wasn't consistent with the bulk of the code;
> but I agree that HACKING doesn't actually mention this, and not everyone
> uses emacs.

Yep, I'm going with what emacs does, which is indent by 1 space here.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list