add GPLv2
[platform/upstream/btrfs-progs.git] / debug-tree.c
index 9699e3c..edc74f2 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2007 Oracle.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <uuid/uuid.h>
@@ -67,15 +85,19 @@ int main(int ac, char **av) {
                                printf("extent tree ");
                                break;
                        }
-                       printf("tree %Lu %Lu %u\n", found_key.objectid,
-                              found_key.offset, found_key.flags);
+                       printf("tree %llu %u %llu\n",
+                              (unsigned long long)found_key.objectid,
+                              found_key.flags,
+                              (unsigned long long)found_key.offset);
                        btrfs_print_tree(root, buf);
                }
                path.slots[0]++;
        }
        btrfs_release_path(root, &path);
-       printf("total blocks %Lu\n", btrfs_super_total_blocks(&super));
-       printf("blocks used %Lu\n", btrfs_super_blocks_used(&super));
+       printf("total blocks %llu\n",
+              (unsigned long long)btrfs_super_total_blocks(&super));
+       printf("blocks used %llu\n",
+              (unsigned long long)btrfs_super_blocks_used(&super));
        uuidbuf[36] = '\0';
        uuid_unparse(super.fsid, uuidbuf);
        printf("uuid %s\n", uuidbuf);