When a dax-bus vs. dax-class expectation causes a failure, such as when reconfiguring device modes, print an error message directly pointing the user to the daxctl-migrate-device-model command.
Reported-by: Dave Hansen <[email protected]> Reported-by: Jeff Moyer <[email protected]> Cc: Dan Williams <[email protected]> Signed-off-by: Vishal Verma <[email protected]> --- daxctl/lib/libdaxctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daxctl/lib/libdaxctl.c b/daxctl/lib/libdaxctl.c index 44842b9..c0a859c 100644 --- a/daxctl/lib/libdaxctl.c +++ b/daxctl/lib/libdaxctl.c @@ -917,6 +917,7 @@ static int daxctl_dev_enable(struct daxctl_dev *dev, enum daxctl_dev_mode mode) if (!device_model_is_dax_bus(dev)) { err(ctx, "%s: error: device model is dax-class\n", devname); + err(ctx, "%s: see man daxctl-migrate-device-model\n", devname); return -EOPNOTSUPP; } @@ -962,6 +963,7 @@ DAXCTL_EXPORT int daxctl_dev_disable(struct daxctl_dev *dev) if (!device_model_is_dax_bus(dev)) { err(ctx, "%s: error: device model is dax-class\n", devname); + err(ctx, "%s: see man daxctl-migrate-device-model\n", devname); return -EOPNOTSUPP; } -- 2.20.1 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
