lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 28 Aug 2018 08:30:38 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Joe Jin <joe.jin@...cle.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>
Subject: Re: [PATCH] xen: export device state to sysfs

On 27/08/18 20:44, Joe Jin wrote:
> Export device state to sysfs to allow for easier get device state.
> 
> Signed-off-by: Joe Jin <joe.jin@...cle.com>
> Boris Ostrovsky <boris.ostrovsky@...cle.com>
> Juergen Gross <jgross@...e.com>

Please add the related documentation to

Documentation/ABI/stable/sysfs-bus-xen-backend


Juergen

> ---
>  drivers/xen/xenbus/xenbus_probe.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
> index 74888cacd0b0..52f99b80a1c0 100644
> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -402,10 +402,19 @@ static ssize_t modalias_show(struct device *dev,
>  }
>  static DEVICE_ATTR_RO(modalias);
>  
> +static ssize_t state_show(struct device *dev,
> +			    struct device_attribute *attr, char *buf)
> +{
> +	return sprintf(buf, "%s\n",
> +			xenbus_strstate(to_xenbus_device(dev)->state));
> +}
> +static DEVICE_ATTR_RO(state);
> +
>  static struct attribute *xenbus_dev_attrs[] = {
>  	&dev_attr_nodename.attr,
>  	&dev_attr_devtype.attr,
>  	&dev_attr_modalias.attr,
> +	&dev_attr_state.attr,
>  	NULL,
>  };
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ