From: Johannes Thumshirn Date: Thu, 30 Nov 2017 10:27:23 +0000 (+0100) Subject: nvmetcli: remove status method for the UIPortNode X-Git-Tag: v0.6~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=69182535c1df21c8cc2d0be4e5b4229f32a057e8;p=users%2Fhch%2Fnvmetcli.git nvmetcli: remove status method for the UIPortNode nvmetcli defines a status method for the UIPortNode class but there is no corresponding 'enable' file in configfs so typing in status will always result in nvmetcli printing disbaled if one types 'status' in the port node: /> cd ports/1/ /ports/1> status Status for /ports/1: disabled /ports/1> There are two possible ways for fixing this issue, provide a configfs file to enable/disable the port node in the kernel or delete the method in nvmetcli. Having a configfs file in the kernel is pointless, as ports get enabled when symlinked to a namespace so zap the pointless status method in user-space. Signed-off-by: Johannes Thumshirn Reported-by: Hannes Reinecke Signed-off-by: Christoph Hellwig --- diff --git a/nvmetcli b/nvmetcli index 5378365..4fbc12e 100755 --- a/nvmetcli +++ b/nvmetcli @@ -356,11 +356,6 @@ class UIPortNode(UINode): UIPortSubsystemsNode(self) UIReferralsNode(self) - def status(self): - if self.cfnode.get_enable(): - return "enabled" - return "disabled" - class UIPortSubsystemsNode(UINode): def __init__(self, parent):