9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Arne Meyer <meyer.arne83@netcologne.de>
To: "9front@9front.org" <9front@9front.org>
Subject: [9front] [patch] fix nusb/disk with libdisk
Date: Sat, 1 Oct 2022 12:15:22 +0200 (CEST)	[thread overview]
Message-ID: <1762238476.3388935.1664619322029@comcenter.netcologne.de> (raw)

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++)

             reply	other threads:[~2022-10-01 10:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01 10:15 Arne Meyer [this message]
2022-10-01 21:10 ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1762238476.3388935.1664619322029@comcenter.netcologne.de \
    --to=meyer.arne83@netcologne.de \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).