lineedit: do not hang on error, but return error indicator.
[oweals/busybox.git] / util-linux / mkswap.c
index 61a786e92dd866df9d69de77257ed813ffcfbe05..53537fcd9dceb1e28742a3c9d572af964df50d93 100644 (file)
@@ -15,8 +15,7 @@ static void mkswap_selinux_setcontext(int fd, const char *path)
        if (!is_selinux_enabled())
                return;
 
-       if (fstat(fd, &stbuf) < 0)
-               bb_perror_msg_and_die("fstat failed");
+       xfstat(fd, &stbuf, argv[0]);
        if (S_ISREG(stbuf.st_mode)) {
                security_context_t newcon;
                security_context_t oldcon = NULL;