Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to target an specific LBA sector from dd extract using c code

Status
Not open for further replies.

wtr

Full Member level 5
Joined
May 1, 2014
Messages
299
Helped
29
Reputation
58
Reaction score
25
Trophy points
1,308
Activity points
4,108
How to target a specific LBA sector from dd extract using c code

Hello all,

I've written a c program that goes through and looks at the binary file I've generated from dd'ing a hard disk.

The problem is the c program is looking at all this "fluff" either side of what I'm actually interested in.

I've used fopen & fread etc...and the pointer moves through the file until it memcmp's the binary identifier & then filters the data accordingly.

What I want to know is how can do the following.

Open file.
discard the first 0x5FFFF LBA's.
scan form LBA 0X60000 to LBA 0X7FC10.
perform data filtering on this sector block.

Where an LBA is 16 bytes in width.

Thanks in Advance,
Wesley.
 

Re: How to target a specific LBA sector from dd extract using c code

reading the file with fread , and searching the buffer ,
will it not help?
 

As you are using stdio.h stream file handling functions, you should also consider fseek().
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top