fwupd/plugins/scsi/fu-plugin-scsi.c
Richard Hughes f0ef6ae05f scsi: Rearchitect the plugin to match a block device
This makes it match the eMMC and SATA plugins, and means we can more easily
walk up to the parent SCSI controller, rather than trying to find the correct
block child.

No functional changes, other than now we also read the disk serial number, and
use one less udev subsystem match.
2022-05-09 07:05:08 +01:00

26 lines
474 B
C

/*
* Copyright (C) 2022 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#include "config.h"
#include <fwupdplugin.h>
#include "fu-scsi-device.h"
static void
fu_plugin_scsi_init(FuPlugin *plugin)
{
fu_plugin_add_udev_subsystem(plugin, "block");
fu_plugin_add_device_gtype(plugin, FU_TYPE_SCSI_DEVICE);
}
void
fu_plugin_init_vfuncs(FuPluginVfuncs *vfuncs)
{
vfuncs->build_hash = FU_BUILD_HASH;
vfuncs->init = fu_plugin_scsi_init;
}