info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mtools] mtools floppyd bug report / patch


From: Alain Knaff
Subject: Re: [mtools] mtools floppyd bug report / patch
Date: Sat, 24 May 2003 23:06:33 +0200
User-agent: KMail/1.5.1

On Saturday 19 April 2003 20:39, Sebastian Kiesel wrote:
> Hi,
>
> I encountered a problem when using floppyd. I tested both the older
> version mtools-3.9.6 and the current mtools-3.9.9
>
> I have floppyd running in daemon mode on my X terminal:
> floppyd -d -s 5703 /dev/fd1
[...]
> # insert the good, previously working floppy again
> $ mdir
> Permission denied, authentication failed!
> Auth failed: Device locked!
> Drive 'A:' not supported
> Cannot initialize 'A:'
[...]
> I could trace the problem as follows (line numbers referring to
> floppyd.c as shipped with mtools-3.9.9):
>
> lines 1111 .. 1119 call for the opcode OP_READ the functions
>    read_packet(parm, ...)
>    send_reply(...)
>    send_packet(parm, ...)
>
> in line 356, read_packet assigns parm->len=read( FLOPPY )
> If reading from the floppy fails for any reason (e.g., defective
> media) parm->len will be assinged -1
>
> send_packet calls buf_write, which in line 189 calls
> memcpy(buf->out_buffer+buf->out_valid, buffer, nbytes);
> with nbytes=parm->len

Thanks for the patch, this is now in mtools-20030524. 

> It seems to work for me, but I am not 100% sure whether this is
> compliant to the floppyd protocol specification. Any comments welcome.

Not sending the packet if its length is -1 is indeed the correct
decision.

Regards,

Alain


_______________________________________________
mtools mailing list
address@hidden
http://www.tux.org/mailman/listinfo/mtools


reply via email to

[Prev in Thread] Current Thread [Next in Thread]