[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [UNIKRAFT PATCH v2 3/7] lib/ukblkdev: blkreq.h: Use typedef for __sector



Hi Simon,

Looks good to me.

Reviewed-by: Laurentiu Barbulescu <lrbarbulescu@xxxxxxxxx>

On Tue, Dec 22, 2020 at 5:38 PM Simon Kuenzer <simon.kuenzer@xxxxxxxxx> wrote:
Introduces `__sector` with a type definition instead with an alias macro.
This is done for consistency reasons. Additionally, the print format macro
`__PRIsctr` is introduced so that a sector number can be printed
correctly.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 lib/ukblkdev/include/uk/blkreq.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/ukblkdev/include/uk/blkreq.h b/lib/ukblkdev/include/uk/blkreq.h
index 17daa6b52..0bf4ae3ff 100644
--- a/lib/ukblkdev/include/uk/blkreq.h
+++ b/lib/ukblkdev/include/uk/blkreq.h
@@ -47,9 +47,11 @@
 extern "C" {
 #endif

-#define __sector size_t
 #include <uk/arch/atomic.h>

+typedef __sz __sector;
+#define __PRIsctr __PRIsz
+
 struct uk_blkreq;

 /**
--
2.20.1

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.