The recorded DSM family can be used to provide family-specific functionality.
Cc: Dan Williams <[email protected]> Signed-off-by: Brian Boylston <[email protected]> --- ndctl/lib/libndctl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 9a9dc74..c824d83 100644 --- a/ndctl/lib/libndctl.c +++ b/ndctl/lib/libndctl.c @@ -136,6 +136,7 @@ struct ndctl_dimm { unsigned short subsystem_revision_id; unsigned short manufacturing_date; unsigned char manufacturing_location; + unsigned long dsm_family; unsigned long dsm_mask; char *unique_id; char *dimm_path; @@ -1145,6 +1146,11 @@ static int add_dimm(void *parent, int id, const char *dimm_base) if (sscanf(buf, "%d:%d", &dimm->major, &dimm->minor) != 2) goto err_read; + sprintf(path, "%s/nfit/family", dimm_base); + if (sysfs_read_attr(ctx, path, buf) < 0) + goto err_read; + dimm->dsm_family = strtoul(buf, NULL, 0); + sprintf(path, "%s/commands", dimm_base); if (sysfs_read_attr(ctx, path, buf) < 0) goto err_read; -- 2.8.3 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
