From: Douglas Gilbert <dgilbert@interlog.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
open-osd mailing-list <osd-dev@open-osd.org>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: export bsg.h header to user-mode
Date: Sat, 07 Mar 2009 11:37:57 -0500 [thread overview]
Message-ID: <49B2A2E5.9050802@interlog.com> (raw)
In-Reply-To: <496E11D6.20705@panasas.com>
Boaz Harrosh wrote:
> Hi TOMO.
>
> I'm using bsg.ko to submit SG_IO version-4 commands to scsi devices
> from user-mode application. (version-4 for use of bidi and varlen).
>
> I have not found a bsg.h header in my fedora-10 distribution. Is
> bsg.h exported in kernel-headers-package in latest Kernels? If not
> should we, and how to do it?
>
> Meanwhile I will manually copy it to /usr/include/linux/bsg.h and see
> if I need to fix any thing so it can be compiled from user-mode.
>
> Also do you have a small libbsg or something to make it easier for
> use by application? should we maintain such a package?
>
> Pete from the OSC osd project has his set of headers and library
> which I used now. Should I clean it up and send it? Or should I just
> keep it as part of the osd project for now? what are the sas and fc
> guys using?
I have been trying to incorporate bsg support into sg3_utils
and need to cope with the /usr/include/linux/bsg.h header being
present or not. It may be present elsewhere (e.g.
/lib/modules/<kernel_version>/build/include/linux/bsg.h ).
Either way bsg.h is still a pain in the user space. The reason
is the kernel's (non standard) "__int" types.
An autotools rule like this to see if linux/bsg.h is present:
AC_CHECK_HEADERS(linux/bsg.h)
creates a lot of noise because it claims bsg.h is not well
formed. The reason is those "__int" types. The solution is to
add this non obvious rule:
AC_CHECK_HEADERS([linux/types.h linux/bsg.h], [], [],
[[#ifdef HAVE_LINUX_TYPES_H
# include <linux/types.h>
#endif
]])
So my suggestion is to add '#include <linux/types.h>' to bsg.h
(or clean up the types).
Doug Gilbert
next prev parent reply other threads:[~2009-03-07 16:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 16:24 export bsg.h header to user-mode Boaz Harrosh
2009-01-15 8:21 ` FUJITA Tomonori
2009-01-15 8:57 ` Boaz Harrosh
2009-01-15 11:22 ` FUJITA Tomonori
2009-01-15 12:06 ` Boaz Harrosh
2009-01-15 12:29 ` FUJITA Tomonori
2009-01-16 0:48 ` Andrew Morton
2009-01-16 6:50 ` Jens Axboe
2009-01-18 8:23 ` [PATCH resend] include/linux: Add bsg.h to the Kernel exported headers Boaz Harrosh
2009-01-18 20:38 ` FUJITA Tomonori
2009-01-19 9:37 ` Jens Axboe
2009-03-07 16:37 ` Douglas Gilbert [this message]
2009-03-08 10:05 ` export bsg.h header to user-mode Boaz Harrosh
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=49B2A2E5.9050802@interlog.com \
--to=dgilbert@interlog.com \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-scsi@vger.kernel.org \
--cc=osd-dev@open-osd.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).