blocksize

| No Comments | No TrackBacks

テープドライブを hack しまくり。

write(fd, buf0, 1100);

というふうに書いたものを、一気に続けて

read(fd, buf1, 100);
read(fd, buf1, 1000);

では読めないんだ。なぜなら、write() は1回で、ブロックはひとつしかなく、小分けにして read() しようとすると、100 バイトしかないバッファに 1100 バイトを入れなきゃいけなくなるから

kernel: (sa0:sym1:0:3:0): 1100-byte tape record bigger than supplied buffer

みたいなメッセージが出る。うほー。こりゃどうしようかな。3分間 hacking で直すか。

No TrackBacks

TrackBack URL: http://yasu2.prosou.nu/mt/mt-tb.cgi/1539

Leave a comment

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.02

August 2010

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Yasunori Osana published on December 8, 2007 1:17 AM.

sigaction() was the previous entry in this blog.

湿疹 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.