linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Pitt <martin.pitt@ubuntu.com>
To: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, David Zeuthen <zeuthen@gmail.com>,
	Kay Sievers <kay@vrfy.org>
Subject: [PATCH 0/1] Option for scsi_debug to fake removable devices
Date: Tue, 5 Jun 2012 09:25:28 +0200	[thread overview]
Message-ID: <20120605072528.GE3043@piware.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

Hello all,

For the purposes of automatically testing udisks and gvfs automounting
I would like to add a parameter to scsi_debug to control the
"removable" attribute of the created block device. With that, we can
test system-internal and removable drives, as well as CD-ROMs (which
scsi_debug can already emulate). udisks requires different privileges
for mounting system-internal drives vs.  removable/hotpluggable
drives.

I wrote a simple kernel patch for this (against linux-next), and
tested this quite thoroughly.

I ran the style checker, and it reports two problems:

------------ 8< --------------
WARNING: line over 80 characters
#109: FILE: drivers/scsi/scsi_debug.c:3255:
+       ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_removable);

WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
#126: FILE: drivers/scsi/scsi_debug.c:3353:
+               printk(KERN_ERR "scsi_debug_init: removable must be 0 or 1\n");
------------ 8< --------------

But as the existing code uses this style in the adjacent lines, I
favored consistency over fixing those. If the latter is desired, I'd
rather send a separate patch with just the style cleanup for the whole
file.

I got a signoff from David Zeuthen (the primary udisks maintainer)
already, noted so in the patch.

Thank you in advance for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2012-06-05  7:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05  7:25 Martin Pitt [this message]
2012-06-05  7:27 ` [PATCH 1/1] [SCSI] scsi_debug: Add "removable" parameter Martin Pitt
2012-06-05 16:16   ` Randy Dunlap
2012-06-05 17:39     ` Martin Pitt
2012-06-27 13:01     ` Martin Pitt
2012-06-05 18:10 ` [PATCH 0/1] Option for scsi_debug to fake removable devices Rolf Eike Beer
2012-06-06  4:08   ` Martin Pitt
2012-06-27 13:03 ` [PATCH v2 1/1] [SCSI] scsi_debug: Add "removable" parameter Martin Pitt
  -- strict thread matches above, loose matches on Subject: below --
2012-07-10  9:22 [PATCH 0/1] Option for scsi_debug to fake removable devices Martin Pitt
2012-09-06 10:03 Martin Pitt

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=20120605072528.GE3043@piware.de \
    --to=martin.pitt@ubuntu.com \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=zeuthen@gmail.com \
    /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).