X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fevent.c;h=bce0b8d82e580c68d7ac2774d8673c4ba328474f;hb=7f440a66c6e6429ce477d208545b6965554ba4cb;hp=a2b564b6572f7bd40f1e0ab004c2e2cc1fa2c62e;hpb=d27446d1c753dc4d628c3072f11e6b7581ccfcd8;p=lttv.git diff --git a/ltt/branches/poly/ltt/event.c b/ltt/branches/poly/ltt/event.c index a2b564b6..bce0b8d8 100644 --- a/ltt/branches/poly/ltt/event.c +++ b/ltt/branches/poly/ltt/event.c @@ -1,6 +1,32 @@ +/* This file is part of the Linux Trace Toolkit viewer + * Copyright (C) 2007 Mathieu Desnoyers + * + * Complete rewrite from the original version made by XangXiu Yang. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License Version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include #include #include +#include /***************************************************************************** *Function name @@ -125,6 +151,7 @@ LttTracefile *ltt_event_position_tracefile(LttEventPosition *ep) guint32 ltt_event_get_unsigned(LttEvent *e, struct marker_field *f) { gboolean reverse_byte_order; + if(unlikely(f->attributes & LTT_ATTRIBUTE_NETWORK_BYTE_ORDER)) { reverse_byte_order = (g_ntohs(0x1) != 0x1); } else {