Page 1 of 1

Reading Maximum Address Of The HD In LBA48

Posted: Fri Sep 07, 2007 1:54 pm
by Lprogster
...False alert!...

Posted: Sat Sep 08, 2007 1:45 am
by Lprogster
I think I have it working - I found a new ATA specification which told me what I needed.

Lster

Posted: Sat Sep 08, 2007 7:06 pm
by pcmattman
Lprogster wrote:I think I have it working - I found a new ATA specification which told me what I needed.

Lster
Care to share what you have to do to get the size in LBA48?

Posted: Sun Sep 09, 2007 2:21 am
by Lprogster
[EDIT]

Good luck,
Lster

Posted: Sun Sep 09, 2007 2:31 am
by pcmattman
My port mistake was worse - in my inport[size] function I forgot to return the data read from the port...

Posted: Sun Sep 09, 2007 3:14 am
by Lprogster
I tend to find, the more complex a task, the simpler the mistakes... LOL

Posted: Sun Sep 09, 2007 3:03 pm
by AndrewAPrice
I remember reading a comment in early Linux source about a function that said something like "I hope this works. I'd hate to have to debug this".

The my complex the code is, the more you want to write it once and never touch it again and assume your the perfect coder who does have bugs.

It'll appear to work, until 2 months later when you've built a whole lot of code dependent on that code and after a day of debugging you've uncovered around 20 bugs in your original code.

It's even scarier when you find major bugs in your code (especially errors in pointer arithmetic) yet it runs perfectly and produces no seen side effects.

Posted: Sun Sep 09, 2007 3:39 pm
by Candy
MessiahAndrw wrote:It's even scarier when you find major bugs in your code (especially errors in pointer arithmetic) yet it runs perfectly and produces no seen side effects.
Seen that a lot, sadly. Usually it's a function that makes a hash of everything but barely compiles, which is then never used.