Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P473
RK3399 clk update problem - reproduction
Active
Public
Actions
Authored by
kjopek_gmail.com
on Jan 6 2021, 4:49 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
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
kjopek_gmail.com
created this paste.
Jan 6 2021, 4:49 PM
2021-01-06 16:49:55 (UTC+0)
kjopek_gmail.com
created this object in space
S1 Global
.
Log In to Comment