src/bringup/bin/bootsvc/integration_test/integration-test.cc
// Consumes the given fd and returns the result of a call to fuchsia.io.Node.NodeGetFlags.
Consumes the given fd and returns the result of a call to fuchsia.io.Node.NodeGetFlags.
Consumes the given fd and returns the result of a call to fuchsia . io . Node . NodeGetFlags .
uint32_t fd_get_flags(fbl::unique_fd fd) {
  zx::channel file_channel;
  if (fdio_fd_transfer(fd.release(), file_channel.reset_and_get_address()) != ZX_OK) {
    return 0;
  }
  fio::Node::SyncClient client(std::move(file_channel));
  auto result = client.NodeGetFlags();
  if (result.status() != ZX_OK) {
    return 0;
  }
  fio::Node::NodeGetFlagsResponse* response = result.Unwrap();
  if (response->s != ZX_OK) {
    return 0;
  }
  return response->flags;
}
uint32_t fd_get_flags ( fbl :: unique_fd fd ) { zx :: channel file_channel ; if ( fdio_fd_transfer ( fd . release ( ) , file_channel . reset_and_get_address ( ) ) != ZX_OK ) { return 0 ; } fio :: Node :: SyncClient client ( std :: move ( file_channel ) ) ; auto result = client . NodeGetFlags ( ) ; if ( result . status ( ) != ZX_OK ) { return 0 ; } fio :: Node :: NodeGetFlagsResponse * response = result . Unwrap ( ) ; if ( response -> s != ZX_OK ) { return 0 ; } return response -> flags ; }
Consumes the given fd and returns the result of a call to fuchsia.io.Node.NodeGetFlags.
Consumes the given fd and returns the result of a call to fuchsia . io . Node . NodeGetFlags .