Fix copyright lines
[folly.git] / folly / experimental / io / HugePageUtil.cpp
index 1ce36986474c6de258672ffa6e8e4af96e23b04a..2bf4273c624d604c9a155d6de969062c4bf84a29 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2012-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-
 #include <iostream>
 #include <stdexcept>
-#include <system_error>
-
-#include <gflags/gflags.h>
 
-#include "folly/File.h"
-#include "folly/Format.h"
-#include "folly/MemoryMapping.h"
-#include "folly/Portability.h"
-#include "folly/Range.h"
-#include "folly/ScopeGuard.h"
-#include "folly/experimental/io/HugePages.h"
+#include <folly/Format.h>
+#include <folly/Range.h>
+#include <folly/experimental/io/HugePages.h>
+#include <folly/portability/GFlags.h>
+#include <folly/system/MemoryMapping.h>
 
 DEFINE_bool(cp, false, "Copy file");
 
@@ -41,9 +29,7 @@ using namespace folly;
 
 namespace {
 
-FOLLY_NORETURN void usage(const char* name);
-
-void usage(const char* name) {
+[[noreturn]] void usage(const char* name) {
   std::cerr << folly::format(
       "Usage: {0}\n"
       "         list all huge page sizes and their mount points\n"
@@ -70,18 +56,20 @@ void list() {
   }
 }
 
-}  // namespace
+} // namespace
 
-
-int main(int argc, char *argv[]) {
-  google::ParseCommandLineFlags(&argc, &argv, true);
+int main(int argc, char* argv[]) {
+  gflags::ParseCommandLineFlags(&argc, &argv, true);
   if (FLAGS_cp) {
-    if (argc != 3) usage(argv[0]);
+    if (argc != 3) {
+      usage(argv[0]);
+    }
     copy(argv[1], argv[2]);
   } else {
-    if (argc != 1) usage(argv[0]);
+    if (argc != 1) {
+      usage(argv[0]);
+    }
     list();
   }
   return 0;
 }
-