* [9front] [patch] fix nusb/disk with libdisk
@ 2022-10-01 10:15 Arne Meyer
2022-10-01 21:10 ` ori
0 siblings, 1 reply; 2+ messages in thread
From: Arne Meyer @ 2022-10-01 10:15 UTC (permalink / raw)
To: 9front
libdisk openscsi expects that when reading the ctl file, it starts with "inquiry". All other sd drivers do this, so nusb/disk should too.
Greetings,
Arne
diff e938acc8ff64a3cbbd6ef7ba88f83e3f03ede681 uncommitted
--- a/sys/src/cmd/nusb/disk/disk.c
+++ b/sys/src/cmd/nusb/disk/disk.c
@@ -155,10 +155,10 @@
part = &lun->part[0];
fmtstrinit(&fmt);
- fmtprint(&fmt, "dev %s\n", dev->dir);
- fmtprint(&fmt, "lun %zd\n", lun - &ums->lun[0]);
if(lun->flags & Finqok)
fmtprint(&fmt, "inquiry %s\n", lun->inq);
+ fmtprint(&fmt, "dev %s\n", dev->dir);
+ fmtprint(&fmt, "lun %zd\n", lun - &ums->lun[0]);
if(lun->blocks > 0)
fmtprint(&fmt, "geometry %llud %ld\n", lun->blocks, lun->lbsize);
for (p = &part[Qdata+1]; p < &part[Qmax]; p++)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9front] [patch] fix nusb/disk with libdisk
2022-10-01 10:15 [9front] [patch] fix nusb/disk with libdisk Arne Meyer
@ 2022-10-01 21:10 ` ori
0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2022-10-01 21:10 UTC (permalink / raw)
To: 9front
Quoth Arne Meyer <meyer.arne83@netcologne.de>:
> libdisk openscsi expects that when reading the ctl file, it starts with "inquiry". All other sd drivers do this, so nusb/disk should too.
patch looks good, but doesn't apply; your mail client appears to have replaced
tabs with spaces.
I'll do the surgery this time.
>
> Greetings,
> Arne
>
> diff e938acc8ff64a3cbbd6ef7ba88f83e3f03ede681 uncommitted
> --- a/sys/src/cmd/nusb/disk/disk.c
> +++ b/sys/src/cmd/nusb/disk/disk.c
> @@ -155,10 +155,10 @@
> part = &lun->part[0];
>
> fmtstrinit(&fmt);
> - fmtprint(&fmt, "dev %s\n", dev->dir);
> - fmtprint(&fmt, "lun %zd\n", lun - &ums->lun[0]);
> if(lun->flags & Finqok)
> fmtprint(&fmt, "inquiry %s\n", lun->inq);
> + fmtprint(&fmt, "dev %s\n", dev->dir);
> + fmtprint(&fmt, "lun %zd\n", lun - &ums->lun[0]);
> if(lun->blocks > 0)
> fmtprint(&fmt, "geometry %llud %ld\n", lun->blocks, lun->lbsize);
> for (p = &part[Qdata+1]; p < &part[Qmax]; p++)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-01 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01 10:15 [9front] [patch] fix nusb/disk with libdisk Arne Meyer
2022-10-01 21:10 ` ori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).