* Returns a dynamically-allocated snapshot name if successful, or a
* pointer-coded error otherwise.
*/
-static char *rbd_dev_v1_snap_info(struct rbd_device *rbd_dev, u32 which,
+static const char *rbd_dev_v1_snap_info(struct rbd_device *rbd_dev, u32 which,
u64 *snap_size, u64 *snap_features)
{
- char *snap_name;
+ const char *snap_name;
int i;
rbd_assert(which < rbd_dev->header.snapc->num_snaps);
return ret;
}
-static char *rbd_dev_v2_snap_name(struct rbd_device *rbd_dev, u32 which)
+static const char *rbd_dev_v2_snap_name(struct rbd_device *rbd_dev, u32 which)
{
size_t size;
void *reply_buf;
return snap_name;
}
-static char *rbd_dev_v2_snap_info(struct rbd_device *rbd_dev, u32 which,
+static const char *rbd_dev_v2_snap_info(struct rbd_device *rbd_dev, u32 which,
u64 *snap_size, u64 *snap_features)
{
u64 snap_id;
u64 size;
u64 features;
- char *snap_name;
+ const char *snap_name;
int ret;
rbd_assert(which < rbd_dev->header.snapc->num_snaps);
return ERR_PTR(ret);
}
-static char *rbd_dev_snap_info(struct rbd_device *rbd_dev, u32 which,
+static const char *rbd_dev_snap_info(struct rbd_device *rbd_dev, u32 which,
u64 *snap_size, u64 *snap_features)
{
if (rbd_dev->image_format == 1)
while (index < snap_count || links != head) {
u64 snap_id;
struct rbd_snap *snap;
- char *snap_name;
+ const char *snap_name;
u64 snap_size = 0;
u64 snap_features = 0;