Writing int/long on Sd card
(Its not circular shifting, its bit shifting, the bits don't go round in a circle they disappear off the end and are lost forever.)

So in the library you are using you are writing bytes to the SD Card.
If you write the data 0x1954 on the card you get 0x5419.
So what is happening is you are writing the least significant byte followed by the most significant.  This is because you have take your int 0x1954 and cast it to a char[2] which contains c[0] = 0x54 and c[1] = 0x19  and then you write that out in the order c[0]c[1] et voila you have reversed you number.

The solution is to reverse the buffer before you write it:

char tmp = buf[0];
buf[0] = buf[1];
buf[1] = tmp;


HOWEVER - If you are only reading and writing from this code, who cares.  As long as you read it in backwards does it matter how it is stored on the SD Card?