blob: be9f9f1d34b4f7893d898817de62faa9e44d1b52 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <zx/log.h>
#include <zircon/syscalls.h>
namespace zx {
zx_status_t log::create(log* result, uint32_t flags) {
zx_status_t status;
zx_handle_t h;
if ((status = zx_log_create(flags, &h)) < 0) {
result->reset(ZX_HANDLE_INVALID);
return status;
} else {
result->reset(h);
return ZX_OK;
}
}
} // namespace zx