diff options
Diffstat (limited to 'sys/fs/procfs/procfs_osrel.c')
-rw-r--r-- | sys/fs/procfs/procfs_osrel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_osrel.c b/sys/fs/procfs/procfs_osrel.c index fd6a4d7e0eea..0102090de4da 100644 --- a/sys/fs/procfs/procfs_osrel.c +++ b/sys/fs/procfs/procfs_osrel.c @@ -45,9 +45,11 @@ procfs_doosrel(PFS_FILL_ARGS) if (uio == NULL) return (EOPNOTSUPP); - if (uio->uio_rw == UIO_READ) { + switch (uio->uio_rw) { + case UIO_READ: sbuf_printf(sb, "%d\n", p->p_osrel); - } else { + break; + case UIO_WRITE: sbuf_trim(sb); sbuf_finish(sb); pp = sbuf_data(sb); @@ -62,6 +64,7 @@ procfs_doosrel(PFS_FILL_ARGS) osrel = ov; } p->p_osrel = osrel; + break; } return (0); } |