Page MenuHomeFreeBSD
Paste P473

RK3399 clk update problem - reproduction
ActivePublic

Authored by kjopek_gmail.com on Jan 6 2021, 4:49 PM.
Tags
None
Referenced Files
F14848849: RK3399 clk update problem - reproduction
Jan 6 2021, 4:49 PM
Subscribers
None
#include <sys/param.h>
#include <sys/mount.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <err.h>
#include <libufs.h>
#include <stdint.h>
#include <stdio.h>
int
main(int argc, char **argv)
{
struct uufsd disk;
uint8_t block[1024 * 1024];
int ii = 0;
const ufs2_daddr_t block_no = 17664;
if (argc != 2) {
fprintf(stderr, "Usage: test_ffs <mountpoint|device>\n");
return (1);
}
if (ufs_disk_fillout(&disk, argv[1]) != 0)
err(1, "ufs_disk_fillout failed");
if (bread(&disk, block_no, block, sizeof(block)) == -1)
err(1, "bread failed");
for (ii = 0; ii < sizeof(block); ii++)
printf("%02hhx%c", block[ii], ii % 16 == 0 ? '\n' : ' ');
printf("\n");
ufs_disk_close(&disk);
return (0);
}

Event Timeline