Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346470
b: refs/heads/master
c: 90a2508
h: refs/heads/master
v: v3
  • Loading branch information
Ed Cashin authored and Linus Torvalds committed Dec 18, 2012
1 parent 281a26c commit d89e49d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa304fdefa568d63c862df7abe55d39811845c7c
refs/heads/master: 90a2508d01845afbb3118615ce44d689cbb0e943
10 changes: 10 additions & 0 deletions trunk/drivers/block/aoe/aoeblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ static ssize_t aoedisk_show_fwver(struct device *dev,

return snprintf(page, PAGE_SIZE, "0x%04x\n", (unsigned int) d->fw_ver);
}
static ssize_t aoedisk_show_payload(struct device *dev,
struct device_attribute *attr, char *page)
{
struct gendisk *disk = dev_to_disk(dev);
struct aoedev *d = disk->private_data;

return snprintf(page, PAGE_SIZE, "%lu\n", d->maxbcnt);
}

static DEVICE_ATTR(state, S_IRUGO, aoedisk_show_state, NULL);
static DEVICE_ATTR(mac, S_IRUGO, aoedisk_show_mac, NULL);
Expand All @@ -106,12 +114,14 @@ static struct device_attribute dev_attr_firmware_version = {
.attr = { .name = "firmware-version", .mode = S_IRUGO },
.show = aoedisk_show_fwver,
};
static DEVICE_ATTR(payload, S_IRUGO, aoedisk_show_payload, NULL);

static struct attribute *aoe_attrs[] = {
&dev_attr_state.attr,
&dev_attr_mac.attr,
&dev_attr_netif.attr,
&dev_attr_firmware_version.attr,
&dev_attr_payload.attr,
NULL,
};

Expand Down

0 comments on commit d89e49d

Please sign in to comment.