xenbus.c (cf40a76e7d5874bb25f4404eecc58a2e033af885) xenbus.c (5657a819a8d94426c76be04dcedfad0f64cfff00)
1/* Xenbus code for blkif backend
2 Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
3 Copyright (C) 2005 XenSource Ltd
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.

--- 353 unchanged lines hidden (view full) ---

362 struct xen_blkif_ring *ring = &blkif->rings[i]; \
363 \
364 result += ring->st_##name; \
365 } \
366 \
367out: \
368 return sprintf(buf, format, result); \
369 } \
1/* Xenbus code for blkif backend
2 Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
3 Copyright (C) 2005 XenSource Ltd
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.

--- 353 unchanged lines hidden (view full) ---

362 struct xen_blkif_ring *ring = &blkif->rings[i]; \
363 \
364 result += ring->st_##name; \
365 } \
366 \
367out: \
368 return sprintf(buf, format, result); \
369 } \
370 static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
370 static DEVICE_ATTR(name, 0444, show_##name, NULL)
371
372VBD_SHOW_ALLRING(oo_req, "%llu\n");
373VBD_SHOW_ALLRING(rd_req, "%llu\n");
374VBD_SHOW_ALLRING(wr_req, "%llu\n");
375VBD_SHOW_ALLRING(f_req, "%llu\n");
376VBD_SHOW_ALLRING(ds_req, "%llu\n");
377VBD_SHOW_ALLRING(rd_sect, "%llu\n");
378VBD_SHOW_ALLRING(wr_sect, "%llu\n");

--- 19 unchanged lines hidden (view full) ---

398 struct device_attribute *attr, \
399 char *buf) \
400 { \
401 struct xenbus_device *dev = to_xenbus_device(_dev); \
402 struct backend_info *be = dev_get_drvdata(&dev->dev); \
403 \
404 return sprintf(buf, format, ##args); \
405 } \
371
372VBD_SHOW_ALLRING(oo_req, "%llu\n");
373VBD_SHOW_ALLRING(rd_req, "%llu\n");
374VBD_SHOW_ALLRING(wr_req, "%llu\n");
375VBD_SHOW_ALLRING(f_req, "%llu\n");
376VBD_SHOW_ALLRING(ds_req, "%llu\n");
377VBD_SHOW_ALLRING(rd_sect, "%llu\n");
378VBD_SHOW_ALLRING(wr_sect, "%llu\n");

--- 19 unchanged lines hidden (view full) ---

398 struct device_attribute *attr, \
399 char *buf) \
400 { \
401 struct xenbus_device *dev = to_xenbus_device(_dev); \
402 struct backend_info *be = dev_get_drvdata(&dev->dev); \
403 \
404 return sprintf(buf, format, ##args); \
405 } \
406 static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)
406 static DEVICE_ATTR(name, 0444, show_##name, NULL)
407
408VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor);
409VBD_SHOW(mode, "%s\n", be->mode);
410
411static int xenvbd_sysfs_addif(struct xenbus_device *dev)
412{
413 int error;
414

--- 702 unchanged lines hidden ---
407
408VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor);
409VBD_SHOW(mode, "%s\n", be->mode);
410
411static int xenvbd_sysfs_addif(struct xenbus_device *dev)
412{
413 int error;
414

--- 702 unchanged lines hidden ---