--- busybox-1.9.0/util-linux/mkswap.c Fri Dec 21 22:00:33 2007 +++ busybox-1.9.0-mkswap/util-linux/mkswap.c Sat Feb 2 18:55:31 2008 @@ -64,9 +64,10 @@ // Figure out how big the device is and announce our intentions. fd = xopen(argv[1], O_RDWR); - len = fdlength(fd); + len = lseek(fd, 0, SEEK_END); + lseek(fd, 0, SEEK_SET); pagesize = getpagesize(); - printf("Setting up swapspace version 1, size = %"OFF_FMT"d bytes\n", + printf("Setting up swapspace version 1, size = %"OFF_FMT"u bytes\n", len - pagesize); mkswap_selinux_setcontext(fd, argv[1]);