*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
cntr_header = &s->ls_cnt_header[i];
lprocfs_stats_collect(s, i, &ret);
- seq_printf(p, " %s:%.*s { samples: %11"LPF64"u",
+ seq_printf(p, " %s:%.*s { samples: %11llu",
cntr_header->lc_name,
width(cntr_header->lc_name, 15), spaces,
ret.lc_count);
seq_printf(p, ", unit: %5s", cntr_header->lc_units);
if (cntr_header->lc_config & LPROCFS_CNTR_AVGMINMAX) {
- seq_printf(p, ", min:%8"LPF64"u, max:%8"LPF64"u,"
- " sum:%16"LPF64"u",
+ seq_printf(p, ", min:%8llu, max:%8llu,"
+ " sum:%16llu",
ret.lc_count ? ret.lc_min : 0,
ret.lc_count ? ret.lc_max : 0,
ret.lc_count ? ret.lc_sum : 0);
}
if (cntr_header->lc_config & LPROCFS_CNTR_STDDEV) {
- seq_printf(p, ", sumsq: %18"LPF64"u",
+ seq_printf(p, ", sumsq: %18llu",
ret.lc_count ? ret.lc_sumsquare : 0);
}
{
struct obd_device *obd;
struct obd_job_stats *stats;
- int val, rc;
+ int rc;
+ __s64 val;
obd = ((struct seq_file *)file->private_data)->private;
if (obd == NULL)
stats = &obd->u.obt.obt_jobstats;
- rc = lprocfs_write_helper(buffer, count, &val);
+ rc = lprocfs_str_to_s64(buffer, count, &val);
if (rc)
return rc;
+ if (val < 0 || val > UINT_MAX)
+ return -ERANGE;
stats->ojs_cleanup_interval = val;
lprocfs_job_cleanup(stats, stats->ojs_cleanup_interval);