All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: ecashin@coraid.com
Subject: [PATCH] aoe: add firmware version to info in sysfs
Date: Wed, 4 May 2005 00:11:37 -0700	[thread overview]
Message-ID: <11151906972755@kroah.com> (raw)
In-Reply-To: <11151906961976@kroah.com>

[PATCH] aoe: add firmware version to info in sysfs

add firmware version to info in sysfs

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 4613ed277ab8a41640434181898ef4649cc7301e
tree a1993e2276302a253f73e5139347e9ab374561bc
parent 93d489fc56f819d8805d80ae83cbafc5e5719804
author Ed L Cashin <ecashin@coraid.com> 1114784665 -0400
committer Greg KH <gregkh@suse.de> 1115188495 -0700

Index: drivers/block/aoe/aoeblk.c
===================================================================
--- 946adcae0abe20dc6d9d58682ea2d6980efd1a4c/drivers/block/aoe/aoeblk.c  (mode:100644 sha1:4780f7926d4292bc8150e2712ea18d8a11204ec2)
+++ a1993e2276302a253f73e5139347e9ab374561bc/drivers/block/aoe/aoeblk.c  (mode:100644 sha1:0e97fcb9f3a15b3bbe5b4a0bb8bd085c20e05b2b)
@@ -37,6 +37,13 @@
 
 	return snprintf(page, PAGE_SIZE, "%s\n", d->ifp->name);
 }
+/* firmware version */
+static ssize_t aoedisk_show_fwver(struct gendisk * disk, char *page)
+{
+	struct aoedev *d = disk->private_data;
+
+	return snprintf(page, PAGE_SIZE, "0x%04x\n", (unsigned int) d->fw_ver);
+}
 
 static struct disk_attribute disk_attr_state = {
 	.attr = {.name = "state", .mode = S_IRUGO },
@@ -50,6 +57,10 @@
 	.attr = {.name = "netif", .mode = S_IRUGO },
 	.show = aoedisk_show_netif
 };
+static struct disk_attribute disk_attr_fwver = {
+	.attr = {.name = "firmware-version", .mode = S_IRUGO },
+	.show = aoedisk_show_fwver
+};
 
 static void
 aoedisk_add_sysfs(struct aoedev *d)
@@ -57,6 +68,7 @@
 	sysfs_create_file(&d->gd->kobj, &disk_attr_state.attr);
 	sysfs_create_file(&d->gd->kobj, &disk_attr_mac.attr);
 	sysfs_create_file(&d->gd->kobj, &disk_attr_netif.attr);
+	sysfs_create_file(&d->gd->kobj, &disk_attr_fwver.attr);
 }
 void
 aoedisk_rm_sysfs(struct aoedev *d)
@@ -64,6 +76,7 @@
 	sysfs_remove_link(&d->gd->kobj, "state");
 	sysfs_remove_link(&d->gd->kobj, "mac");
 	sysfs_remove_link(&d->gd->kobj, "netif");
+	sysfs_remove_link(&d->gd->kobj, "firmware-version");
 }
 
 static int


      reply	other threads:[~2005-05-04  7:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04  7:10 [GIT PATCH] AOE bugfixes for 2.6.12-rc3 Greg KH
2005-05-04  7:11 ` [PATCH] aoe: improve allowed interfaces configuration Greg KH
2005-05-04  7:11   ` [PATCH] aoe: aoe-stat should work for built-in as well as module Greg KH
2005-05-04  7:11     ` [PATCH] aoe: update the documentation to mention aoetools Greg KH
2005-05-04  7:11       ` [PATCH] aoe: allow multiple aoe devices to have the same mac Greg KH
2005-05-04  7:11         ` [PATCH] aoe: update version number to 10 Greg KH
2005-05-04  7:11           ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11151906972755@kroah.com \
    --to=gregkh@suse.de \
    --cc=ecashin@coraid.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.