blob: 3ea32406646a991e16d15a283684b1669343a294 [file] [log] [blame]
Jocelyn Bohr185432c2015-08-13 14:16:09 -07001// Copyright 2015 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Yi Chou9d24b462020-12-04 01:12:57 +08005#include "tpm2-simulator/simulator.h"
Jocelyn Bohr185432c2015-08-13 14:16:09 -07006
Yi Chou9d24b462020-12-04 01:12:57 +08007#include <base/command_line.h>
8#include <base/logging.h>
9#include <brillo/syslog_logging.h>
Jocelyn Bohr185432c2015-08-13 14:16:09 -070010
Yi Chou9d24b462020-12-04 01:12:57 +080011int main(int argc, char* argv[]) {
12 // Initialize command line configuration early, as logging will require
13 // command line to be initialized
14 base::CommandLine::Init(argc, argv);
15 brillo::InitLog(brillo::kLogToSyslog | brillo::kLogToStderrIfTty);
Jocelyn Bohr185432c2015-08-13 14:16:09 -070016
Yi Chou9d24b462020-12-04 01:12:57 +080017 if (argc != 1) {
18 LOG(ERROR) << "Program accepts no command line arguments";
19 return EXIT_FAILURE;
Jocelyn Bohr185432c2015-08-13 14:16:09 -070020 }
Yi Chou9d24b462020-12-04 01:12:57 +080021
22 tpm2_simulator::SimulatorDaemon daemon;
23 daemon.Run();
Jocelyn Bohr185432c2015-08-13 14:16:09 -070024}