namespace_devs.c (047fc8a1f9a6330eacc80374dff087e20dc2304b) namespace_devs.c (fcae695737fca0849c18db814d9d8de05c0fd2a2)
1/*
2 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but

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

1054
1055 /* no address to convey if the namespace has no allocation */
1056 if (resource_size(res) == 0)
1057 return -ENXIO;
1058 return sprintf(buf, "%#llx\n", (unsigned long long) res->start);
1059}
1060static DEVICE_ATTR_RO(resource);
1061
1/*
2 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but

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

1054
1055 /* no address to convey if the namespace has no allocation */
1056 if (resource_size(res) == 0)
1057 return -ENXIO;
1058 return sprintf(buf, "%#llx\n", (unsigned long long) res->start);
1059}
1060static DEVICE_ATTR_RO(resource);
1061
1062static const unsigned long ns_lbasize_supported[] = { 512, 0 };
1062static const unsigned long ns_lbasize_supported[] = { 512, 520, 528,
1063 4096, 4104, 4160, 4224, 0 };
1063
1064static ssize_t sector_size_show(struct device *dev,
1065 struct device_attribute *attr, char *buf)
1066{
1067 struct nd_namespace_blk *nsblk = to_nd_namespace_blk(dev);
1068
1069 if (!is_namespace_blk(dev))
1070 return -ENXIO;

--- 798 unchanged lines hidden ---
1064
1065static ssize_t sector_size_show(struct device *dev,
1066 struct device_attribute *attr, char *buf)
1067{
1068 struct nd_namespace_blk *nsblk = to_nd_namespace_blk(dev);
1069
1070 if (!is_namespace_blk(dev))
1071 return -ENXIO;

--- 798 unchanged lines hidden ---