From: Heiko Helmle (heiko.helmle_at_head.de)
Date: Thu Nov 23 2006 - 17:28:28 CET
Message-ID: <4565CC2C.3030909@head.de> Date: Thu, 23 Nov 2006 17:28:28 +0100 From: Heiko Helmle <heiko.helmle@head.de> Subject: Re: [suse-sles-e] is mt a bit broken on SLES10?
Marcus Meissner wrote:
> Hmm.
>
> I can only suggest to add debugging output to
> mt.c:do_dat_compression()
>
> I think the "mask" handling overwrites the cleared flag again,
> perhaps print out mask[4+2] there to see if the drives allows it.
>
You were right. I asked one of our C gurus here - he found two bugs in
this little function, produced a patch and mt is working now!
--- mt.c 2006-11-23 17:17:29.000000000 +0100
+++ /tmp/mt.c 2006-11-23 17:21:27.000000000 +0100
@@ -537,13 +537,13 @@
error (2, errno, "%s", dev);
}
- if (count != 1) {
+ if (count != -1) {
if (count == 0)
buffer[4+2] &= 0x7f;
else
buffer[4+2] |= 0x80;
if (read_mode_page(fn, 0x0f, 16, mask, 1))
- for (i=2; i < 16; i++)
+ for (i=3; i < 16; i++)
buffer[4+i] |= mask[4+i];
if (!write_mode_page(fn, 0x0f, 16, buffer)) {
error (2, errno, "%s", dev);
---------------------------------------------------------------------
To unsubscribe, e-mail: suse-sles-e-unsubscribe@suse.com
For additional commands, e-mail: suse-sles-e-help@suse.com
This archive was generated by hypermail 2.1.7 : Thu Nov 23 2006 - 19:32:44 CET