summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-02-27 11:18:28 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-02-27 11:18:28 -0600
commit533db149bce64a16d27b02d2db1a8474bf3dac6f (patch)
tree023600c513325cf2551b371bfe575d0034193f3c /nuttx/fs
parent7267d55e379aca0ac0f0ba270c1f5e01476bdc4e (diff)
downloadnuttx-533db149bce64a16d27b02d2db1a8474bf3dac6f.tar.gz
nuttx-533db149bce64a16d27b02d2db1a8474bf3dac6f.tar.bz2
nuttx-533db149bce64a16d27b02d2db1a8474bf3dac6f.zip
procfs: Remove newline from the end of the cpuload and loadavg outputs so that the returned percentages can be printed on the same line as other data.
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/procfs/fs_procfscpuload.c2
-rw-r--r--nuttx/fs/procfs/fs_procfsproc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/fs/procfs/fs_procfscpuload.c b/nuttx/fs/procfs/fs_procfscpuload.c
index 75572dee3..87883926e 100644
--- a/nuttx/fs/procfs/fs_procfscpuload.c
+++ b/nuttx/fs/procfs/fs_procfscpuload.c
@@ -256,7 +256,7 @@ static ssize_t cpuload_read(FAR struct file *filep, FAR char *buffer,
fracpart = 0;
}
- linesize = snprintf(attr->line, CPULOAD_LINELEN, "%3d.%01d%%\n",
+ linesize = snprintf(attr->line, CPULOAD_LINELEN, "%3d.%01d%%",
intpart, fracpart);
/* Save the linesize in case we are re-entered with f_pos > 0 */
diff --git a/nuttx/fs/procfs/fs_procfsproc.c b/nuttx/fs/procfs/fs_procfsproc.c
index 0782479b0..8e25dcc8e 100644
--- a/nuttx/fs/procfs/fs_procfsproc.c
+++ b/nuttx/fs/procfs/fs_procfsproc.c
@@ -583,7 +583,7 @@ static ssize_t proc_loadavg(FAR struct proc_file_s *procfile,
fracpart = 0;
}
- linesize = snprintf(procfile->line, STATUS_LINELEN, "%3d.%01d%%\n",
+ linesize = snprintf(procfile->line, STATUS_LINELEN, "%3d.%01d%%",
intpart, fracpart);
copysize = procfs_memcpy(procfile->line, linesize, buffer, buflen, &offset);