shithub: npe

Download patch

ref: b4fc8112b2c73cdd7dfe21b9b0172b19c5c7ea08
parent: 7f653da168fc6f7aa478967a33c4e94f3916a5a3
author: Jacob Moody <moody@posixcafe.org>
date: Sat Dec 13 10:31:41 EST 2025

libnpe: zero unknown fields in stat and fill in dev

--- a/libnpe/stat.c
+++ b/libnpe/stat.c
@@ -13,6 +13,9 @@
 		return -1;
 	}
 
+	memset(buf, 0, sizeof(*buf));
+	buf->st_dev = d->type;
+	buf->st_rdev = d->dev;
 	buf->st_size = d->length;
 	buf->st_mtime = d->mtime;
 	buf->st_atime = d->atime;
--