*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define mkswap_trivial_usage
+//usage: "[-L LBL] BLOCKDEV [KBYTES]"
+//usage:#define mkswap_full_usage "\n\n"
+//usage: "Prepare BLOCKDEV to be used as swap partition\n"
+//usage: "\n -L LBL Label"
+
#include "libbb.h"
#if ENABLE_SELINUX
if (!is_selinux_enabled())
return;
- if (fstat(fd, &stbuf) < 0)
- bb_perror_msg_and_die("fstat failed");
+ xfstat(fd, &stbuf, path);
if (S_ISREG(stbuf.st_mode)) {
security_context_t newcon;
security_context_t oldcon = NULL;