Plan 9 from Bell Labs’s /usr/web/sources/patch/sdmpt2-fix

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--- /n/contrib.9front.org/stallion/src/sdmpt2.c	Sat Aug 17 05:29:05 2013
+++ /sys/src/9/pc/sdmpt2.c	Mon Sep 27 14:29:52 2021
@@ -7,9 +7,17 @@
 #include "dat.h"
 #include "fns.h"
 #include "io.h"
+#include "../port/pci.h"
 #include "../port/error.h"
 
 #include "../port/sd.h"
+
+#define	HOWMANY(x, y)	(((x)+((y)-1))/(y))
+#define ROUNDUP(x, y)	(HOWMANY((x), (y))*(y))
+
+#define L16GET(p) (((p)[1]<<8)|(p)[0])
+#define L32GET(p) (((u32int)L16GET((p)+2)<<16)|L16GET(p))
+#define L64GET(p) ((uvlong)L32GET((p)+4)<<32|L32GET(p))
 
 extern SDifc sdmpt2ifc;
 


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].