Whamcloud - gitweb
LU-8842 mdc: Make IT_OPEN take lookup bits lock
[fs/lustre-release.git] / lustre / utils / ll_decode_filter_fid.c
index f2ff2dc..f088343 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -46,7 +42,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/xattr.h>
-#include <libcfs/libcfs.h>
+#include <asm/byteorder.h>
 #include <lustre/lustre_user.h>
 
 int main(int argc, char *argv[])
@@ -75,20 +71,20 @@ int main(int argc, char *argv[])
                        struct filter_fid_old *ffo = (void *)buf;
 
                        /* old filter_fid */
-                       printf("%s: objid="LPU64" seq="LPU64" parent="DFID
+                       printf("%s: objid=%llu seq=%llu parent="DFID
                               " stripe=%u\n", argv[i],
-                              le64_to_cpu(ffo->ff_objid),
-                              le64_to_cpu(ffo->ff_seq),
-                              le64_to_cpu(ffo->ff_parent.f_seq),
-                              le32_to_cpu(ffo->ff_parent.f_oid), 0 /* ver */,
+                              (unsigned long long)__le64_to_cpu(ffo->ff_objid),
+                              (unsigned long long)__le64_to_cpu(ffo->ff_seq),
+                              (unsigned long long)__le64_to_cpu(ffo->ff_parent.f_seq),
+                              le32toh(ffo->ff_parent.f_oid), 0 /* ver */,
                               /* this is stripe_nr actually */
-                              le32_to_cpu(ffo->ff_parent.f_stripe_idx));
+                              le32toh(ffo->ff_parent.f_stripe_idx));
                } else {
                        printf("%s: parent="DFID" stripe=%u\n", argv[i],
-                              le64_to_cpu(ff->ff_parent.f_seq),
-                              le32_to_cpu(ff->ff_parent.f_oid), 0, /* ver */
+                              (unsigned long long)__le64_to_cpu(ff->ff_parent.f_seq),
+                              __le32_to_cpu(ff->ff_parent.f_oid), 0, /* ver */
                               /* this is stripe_nr actually */
-                              le32_to_cpu(ff->ff_parent.f_stripe_idx));
+                              __le32_to_cpu(ff->ff_parent.f_stripe_idx));
                }
        }