swapon: add swap format detection and pagesize check
As swap format depends on the pagesize being used, it may happen
that the pagesize of the swap space and the current pagesize differ,
resulting in swapon to fail when trying to enable such a swap space.
In such a case swapon should rather reinitialize the swap space.
[kzak@redhat.com: - add blkdev.c to the global swapon_SOURCES
- don't try to detect for huge pages on small swap
areas (or when read() returns less than MAX_PAGESIZE)
- fix fprintf() format string]
Co-Author: Olaf Hering <olh@suse.de> Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>