[bootlin/training-materials updates] master: debugging: lab-data: add crc in crc_random app output (e1e8078f)
Clément Léger
clement.leger at bootlin.com
Thu Nov 17 14:42:20 CET 2022
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/e1e8078f1485321b4afda030dfc8b7d60f42c7d1
>---------------------------------------------------------------
commit e1e8078f1485321b4afda030dfc8b7d60f42c7d1
Author: Clément Léger <clement.leger at bootlin.com>
Date: Thu Nov 17 14:42:20 2022 +0100
debugging: lab-data: add crc in crc_random app output
Signed-off-by: Clément Léger <clement.leger at bootlin.com>
>---------------------------------------------------------------
e1e8078f1485321b4afda030dfc8b7d60f42c7d1
lab-data/debugging/nfsroot/root/system_profiling/crc_random.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lab-data/debugging/nfsroot/root/system_profiling/crc_random.c b/lab-data/debugging/nfsroot/root/system_profiling/crc_random.c
index 006f5bcf..0577ab02 100644
--- a/lab-data/debugging/nfsroot/root/system_profiling/crc_random.c
+++ b/lab-data/debugging/nfsroot/root/system_profiling/crc_random.c
@@ -51,6 +51,7 @@ static uint32_t crc32(const void *data, size_t n_bytes)
int main(int argc, char **argv)
{
int urandom_fd;
+ uint32_t crc;
char *data;
ssize_t ret;
uint64_t start_nano, end_nano;
@@ -81,11 +82,11 @@ int main(int argc, char **argv)
clock_gettime(CLOCK_MONOTONIC, &start);
start_nano = timespec_to_nano(&start);
- crc32(data, RANDOM_SIZE);
+ crc = crc32(data, RANDOM_SIZE);
clock_gettime(CLOCK_MONOTONIC, &end);
end_nano = timespec_to_nano(&end);
- printf("Computed crc in %" PRIu64 " nano\n", end_nano - start_nano);
+ printf("Computed crc %" PRIu32 " in %" PRIu64 " nano\n", crc, end_nano - start_nano);
}
free(data);
More information about the training-materials-updates
mailing list