code: plan9front

Download patch

ref: 11bc8cce33b3922e0fbc4f2d63a42426f6f5a4db
parent: 5c78e0bd5789829aace4ccc798d672d7bc8b459f
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Aug 26 07:56:01 EDT 2022

sdnvme: correct mode/serial/firmware string lengths

--- a/sys/src/9/port/sdnvme.c
+++ b/sys/src/9/port/sdnvme.c
@@ -354,9 +354,9 @@
 	e = p+l;
 	s = p;
 
-	p = seprint(p, e, "model\t%.20s\n", (char*)ctlr->ident+24);
-	p = seprint(p, e, "serial\t%.10s\n", (char*)ctlr->ident+4);
-	p = seprint(p, e, "firm\t%.6s\n", (char*)ctlr->ident+64);
+	p = seprint(p, e, "model\t%.40s\n", (char*)ctlr->ident+24);
+	p = seprint(p, e, "serial\t%.20s\n", (char*)ctlr->ident+4);
+	p = seprint(p, e, "firm\t%.8s\n", (char*)ctlr->ident+64);
 	p = seprint(p, e, "geometry %llud %lud\n", u->sectors, u->secsize);
 
 	return p-s;