blob: ddb4c5f875f39422b43bbc2e8c52c3258c51e73d [file] [log] [blame]
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package firmware
import (
fwpb "chromiumos/tast/services/cros/firmware"
func init() {
Register: func(srv *grpc.Server, s *testing.ServiceState) {
fwpb.RegisterFpUpdaterServiceServer(srv, &FpUpdaterService{s: s})
// FpUpdaterService implements tast.cros.firmware.FpUpdaterService.
type FpUpdaterService struct {
s *testing.ServiceState
// ReadUpdaterLogs reads the latest and previous logs from the fingerprint firmware updater.
func (*FpUpdaterService) ReadUpdaterLogs(ctx context.Context, req *empty.Empty) (*fwpb.ReadFpUpdaterLogsResponse, error) {
latestData, previousData, err := firmware.ReadFpUpdaterLogs()
if err != nil {
return nil, err
return &fwpb.ReadFpUpdaterLogsResponse{LatestLog: latestData, PreviousLog: previousData}, nil