Re: [suse-sles-e] is mt a bit broken on SLES10?

From: Marcus Meissner (meissner_at_suse.de)
Date: Thu Nov 23 2006 - 17:44:20 CET


Date: Thu, 23 Nov 2006 17:44:20 +0100
From: Marcus Meissner <meissner@suse.de>
Message-ID: <20061123164420.GA2432@suse.de>
Subject: Re: [suse-sles-e] is mt a bit broken on SLES10?

On Thu, Nov 23, 2006 at 05:28:28PM +0100, Heiko Helmle wrote:
> 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);

I guess I will have to whip out my SCSI TAPE standard to verify that the mask
change is ok ;)

I opened a bug for openSUSE 10.3, not sure if we will roll a SLE10 update
for this.

Ciao, Marcus

---------------------------------------------------------------------
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:48:05 CET