@@ -250,7 +250,7 @@ static ssize_t show_fcf_state(struct device *dev,
name = get_fcoe_fcf_state_name(fcf->state);
if (!name)
return -EINVAL;
- return snprintf(buf, FCOE_FCF_STATE_MAX_NAMELEN, "%s\n", name);
+ return sysfs_emit(buf, "%s\n", name);
}
static FCOE_DEVICE_ATTR(fcf, state, S_IRUGO, show_fcf_state, NULL);
@@ -265,8 +265,7 @@ static ssize_t show_ctlr_mode(struct device *dev,
name = get_fcoe_ctlr_mode_name(ctlr->mode);
if (!name)
return -EINVAL;
- return snprintf(buf, FCOE_MAX_MODENAME_LEN,
- "%s\n", name);
+ return sysfs_emit(buf, "%s\n", name);
}
static ssize_t store_ctlr_mode(struct device *dev,
@@ -373,8 +372,7 @@ static ssize_t show_ctlr_enabled_state(struct device *dev,
name = get_fcoe_ctlr_enabled_state_name(ctlr->enabled);
if (!name)
return -EINVAL;
- return snprintf(buf, FCOE_CTLR_ENABLED_MAX_NAMELEN,
- "%s\n", name);
+ return sysfs_emit(buf, "%s\n", name);
}
static FCOE_DEVICE_ATTR(ctlr, enabled, S_IRUGO | S_IWUSR,