swapon(8): Fix "swapctl -l".
authorSascha Wildner <saw@online.de>
Sat, 30 Apr 2011 22:27:05 +0000 (00:27 +0200)
committerSascha Wildner <saw@online.de>
Sat, 30 Apr 2011 22:27:33 +0000 (00:27 +0200)
commitebd20800f90101c7f35180985899fb1c94af5021
treec89e3bf154b69e6163ca165835cb13f5b1958a6a
parent10941c4b8a03b8b4cca8ffbbf95e89c96b026649
swapon(8): Fix "swapctl -l".

Without -s, swapctl -l would report 0 for swap size and used swap because
some variables were initialized only for the -s case. Just remove the
"if (sflag)" around the calculation.

Reported-by: Joachim de Groot <jdegroot@web.de>
Taken-from:  FreeBSD
sbin/swapon/swapon.c