]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'wdctl/sysfs-firmware_version' of https://github.com/t-8ch/util-linux
authorKarel Zak <kzak@redhat.com>
Thu, 2 Mar 2023 13:42:29 +0000 (14:42 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 2 Mar 2023 13:42:29 +0000 (14:42 +0100)
* 'wdctl/sysfs-firmware_version' of https://github.com/t-8ch/util-linux:
  wdctl: read options from sysfs
  wdctl: read firmware version from sysfs

sys-utils/wdctl.c

index 591d538c221ab8624fb09ceb41a7c498b7121cd9..2a656b85b77dc56f844117ba773d8d4cd8946092 100644 (file)
@@ -550,6 +550,8 @@ static int read_watchdog_from_sysfs(struct wd_device *wd)
                return 1;
 
        ul_path_read_buffer(sys, (char *) wd->ident.identity, sizeof(wd->ident.identity), "identity");
+       ul_path_read_u32(sys, &wd->ident.firmware_version, "fw_version");
+       ul_path_scanf(sys, "options", "%x", &wd->ident.options);
 
        ul_path_scanf(sys, "status", "%x", &wd->status);
        ul_path_read_u32(sys, &wd->bstatus, "bootstatus");