world - Fix sysctlbyname() errno handling cases
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Jun 2016 06:04:18 +0000 (23:04 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Jun 2016 06:04:18 +0000 (23:04 -0700)
commit088b2e6829c8b2435f30ddec170f32b1f5c90cb4
treec43bf4ad671e3972c33e5c2347c275d9d3fd39fb
parent640406cb75258a91ef56a5c1c1deaa0f2edb8b7a
world - Fix sysctlbyname() errno handling cases

* A number of routines inherited some bad code from each other,
  The return value from sysctlbyname() was not being tested prior
  to checking errno.  Reformulate.

Reported-by: Stephen Welker stephen.welker@nemostar.com.au
sbin/fdisk/fdisk.c
sbin/mount_ufs/mount_ufs.c
sbin/newfs/newfs.c
sbin/newfs_hammer/newfs_hammer.c
sbin/swapon/swapon.c