* [announce] scsi_id release 0.2
@ 2003-12-05 23:18 Patrick Mansfield
2003-12-07 15:38 ` Olaf Hering
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Mansfield @ 2003-12-05 23:18 UTC (permalink / raw)
To: linux-scsi, linux-hotplug-devel
Version 0.2 of scsi_id is available at:
http://www-124.ibm.com/storageio/scsi_id/scsi_id-0.2.tar.gz
scsi_id is a program to generate a SCSI unique identifier for a given SCSI
device.
It is primarily for use with udev callout config entries. It can also be
used for automatic multi-path configuration or device mapper
configuration.
Requires:
- Linux kernel 2.6
- libsysfs 0.3.0
To use with udev, in short:
Run scsi_id to dump determine the id, for example, for sda, run:
/sbin/scsi_id -s /block/sda
Take the resulting value (including white space) and use it as the ID in a
udev CALLOUT entry, an example /etc/udev/udev.rules entry for one of
my disk drives:
CALLOUT, BUS="scsi", PROGRAM="/sbin/scsi_id", ID="200609487340c78ac", NAME="diskf1"
Major changes since the last release:
- builds under udev and klibc (I'll post udev/Makefile changes I
needed to get the build to work), does not build properly for
udev without klibc because of sysfsutils include paths issue
- fix a bug with config file options parsing not allocating space
- added a man page
Full list of changes:
* Add a man page.
* Set and use variables that might be passed down when
built under udev (with or without klibc), don't set LDFLAGS or
STRIP.
* scsi_id.c, scsi_id.h: Fix a bad bug - when parsing file options,
no space was allocated for the creation of the new argv[]
strings.
* scsi_id.c: Catch too long a line in the config file.
* scsi_id.h: Add u8 typedef to avoid ummm scsi.h kernel header
problem when built with klibc.
* scsi_id.h: Add define of makedev() if built with klibc.
* scsi_id.c: reset optind to 1 since klibc does not work if it is
reset to zero.
* scsi_id.c: remove fflush() as it is not needed, and is not
supported by klibc.
* scsi_serial.c: Make the functions do_scsi_page0_inquiry and
do_scsi_page80_inquiry static.
* scsi_id.c: Don't use syslog LOG_PID, as it is not supported by
klibc.
* scsi_id.c, scsi_serial.c: Hack - change include path to libsysfs
if built under klibc.
* Makefile: Use "override" for CFLAGS so we can pass CFLAGS values
down when built with udev
* scsi_id.c, Makefile: Use SCSI_ID_VERSION instead of VERSION.
* scsi_id.c: Remove getopt_long (long option names), as there
is no support for that in klibc.
* scsi_id.c: Patch from Brian King <brking@us.ibm.com>: check
result of setting model, not vendor in per_dev_options.
* scsi_id.c, scsi_serial.c: Use new and correct path to libsysfs.h.
* scsi_id.h: Fix scsi_id.h so var args in macros works ok with
older gcc.
Please email me any questions, comments or patches.
Thanks!
-- Patrick Mansfield
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [announce] scsi_id release 0.2
2003-12-05 23:18 [announce] scsi_id release 0.2 Patrick Mansfield
@ 2003-12-07 15:38 ` Olaf Hering
2003-12-07 19:42 ` Patrick Mansfield
0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2003-12-07 15:38 UTC (permalink / raw)
To: Patrick Mansfield; +Cc: linux-scsi, linux-hotplug-devel
On Fri, Dec 05, Patrick Mansfield wrote:
> Version 0.2 of scsi_id is available at:
>
> http://www-124.ibm.com/storageio/scsi_id/scsi_id-0.2.tar.gz
What is $(DEBUG)? It is used by klibc and replaced by true/false.
diff -purN scsi_id-0.2/Makefile extras/scsi_id/Makefile
--- scsi_id-0.2/Makefile 2003-12-05 23:26:25.000000000 +0100
+++ extras/scsi_id/Makefile 2003-12-07 16:08:20.000000000 +0100
@@ -27,7 +27,7 @@ INSTALL_DATA = ${INSTALL} -m 644
# Note some of the variables used here are set when built under udev, and
# otherwise might not be set.
-override CFLAGS+=-DSCSI_ID_VERSION=\"$(SCSI_ID_VERSION)\" $(DEBUG) -Wall
+override CFLAGS+=-DSCSI_ID_VERSION=\"$(SCSI_ID_VERSION)\" -Wall
PROG=scsi_id
SYSFS=-lsysfs
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [announce] scsi_id release 0.2
2003-12-07 15:38 ` Olaf Hering
@ 2003-12-07 19:42 ` Patrick Mansfield
2003-12-07 19:59 ` Olaf Hering
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Mansfield @ 2003-12-07 19:42 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-scsi, linux-hotplug-devel
On Sun, Dec 07, 2003 at 04:38:02PM +0100, Olaf Hering wrote:
> On Fri, Dec 05, Patrick Mansfield wrote:
>
> > Version 0.2 of scsi_id is available at:
> >
> > http://www-124.ibm.com/storageio/scsi_id/scsi_id-0.2.tar.gz
>
> What is $(DEBUG)? It is used by klibc and replaced by true/false.
I use it to compile with -g.
i.e.:
# make DEBUG=-g
cc -DSCSI_ID_VERSION=\"0.2\" -g -Wall -c -o scsi_id.o scsi_id.c
cc -DSCSI_ID_VERSION=\"0.2\" -g -Wall -c -o scsi_serial.o scsi_serial.c
cc -o scsi_id scsi_id.o scsi_serial.o -lsysfs
The udev DEBUG value does not get passed down to the extras, so the
scsi_id build under udev should be OK.
Is it breaking your build? If so I'll just remove it.
The scsi_id debug logging via the "-v" or when DEBUG is set is always
enabled - it outputs to syslog LOG_DEBUG when called from udev, or via
stderr when used via the command line. (Though the klibc strerror() only
prints the errno value, making for some odd error messages.)
-- Patrick Mansfield
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [announce] scsi_id release 0.2
2003-12-07 19:42 ` Patrick Mansfield
@ 2003-12-07 19:59 ` Olaf Hering
2003-12-07 20:38 ` Patrick Mansfield
2003-12-12 14:27 ` Rask Ingemann Lambertsen
0 siblings, 2 replies; 6+ messages in thread
From: Olaf Hering @ 2003-12-07 19:59 UTC (permalink / raw)
To: Patrick Mansfield; +Cc: linux-scsi, linux-hotplug-devel
On Sun, Dec 07, Patrick Mansfield wrote:
> On Sun, Dec 07, 2003 at 04:38:02PM +0100, Olaf Hering wrote:
> > On Fri, Dec 05, Patrick Mansfield wrote:
> >
> > > Version 0.2 of scsi_id is available at:
> > >
> > > http://www-124.ibm.com/storageio/scsi_id/scsi_id-0.2.tar.gz
> >
> > What is $(DEBUG)? It is used by klibc and replaced by true/false.
>
> I use it to compile with -g.
>
> i.e.:
>
> # make DEBUG=-g
> cc -DSCSI_ID_VERSION=\"0.2\" -g -Wall -c -o scsi_id.o scsi_id.c
> cc -DSCSI_ID_VERSION=\"0.2\" -g -Wall -c -o scsi_serial.o scsi_serial.c
> cc -o scsi_id scsi_id.o scsi_serial.o -lsysfs
>
> The udev DEBUG value does not get passed down to the extras, so the
> scsi_id build under udev should be OK.
It does. make EXTRAS=extras/scsi_id will pass DEBUG=false/true if
defined.
> Is it breaking your build? If so I'll just remove it.
Yes, just try to build a udev debug binary.
I need also this patch because gcc decides that a printf("\n"); could be
done with a putchar, which is not defined for some reasons.
--- extras/scsi_id/Makefile.orig 2003-12-07 15:05:33.000000000 +0100
+++ extras/scsi_id/Makefile 2003-12-07 15:14:09.000000000 +0100
@@ -27,7 +27,7 @@ INSTALL_DATA = ${INSTALL} -m 644
# Note some of the variables used here are set when built under udev, and
# otherwise might not be set.
-override CFLAGS+=-DSCSI_ID_VERSION=\"$(SCSI_ID_VERSION)\" $(DEBUG) -Wall
+override CFLAGS+=-DSCSI_ID_VERSION=\"$(SCSI_ID_VERSION)\" -Wall -fno-builtin
PROG=scsi_id
SYSFS=-lsysfs
Greg has the new scsi_id already merged into the bk repo.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [announce] scsi_id release 0.2
2003-12-07 19:59 ` Olaf Hering
@ 2003-12-07 20:38 ` Patrick Mansfield
2003-12-12 14:27 ` Rask Ingemann Lambertsen
1 sibling, 0 replies; 6+ messages in thread
From: Patrick Mansfield @ 2003-12-07 20:38 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-scsi, linux-hotplug-devel
On Sun, Dec 07, 2003 at 08:59:15PM +0100, Olaf Hering wrote:
> On Sun, Dec 07, Patrick Mansfield wrote:
>
> > Is it breaking your build? If so I'll just remove it.
>
> Yes, just try to build a udev debug binary.
It worked fine for me, something must be different in our build
environments. I have:
[elm3b79 udev-bk]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
I should probably upgrade.
But in any case I applied your patch to my view, thanks.
-- Patrick Mansfield
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [announce] scsi_id release 0.2
2003-12-07 19:59 ` Olaf Hering
2003-12-07 20:38 ` Patrick Mansfield
@ 2003-12-12 14:27 ` Rask Ingemann Lambertsen
1 sibling, 0 replies; 6+ messages in thread
From: Rask Ingemann Lambertsen @ 2003-12-12 14:27 UTC (permalink / raw)
To: Olaf Hering; +Cc: Patrick Mansfield, linux-scsi, linux-hotplug-devel
On Sun, Dec 07, 2003 at 08:59:15PM +0100, Olaf Hering wrote:
> I need also this patch because gcc decides that a printf("\n"); could be
> done with a putchar, which is not defined for some reasons.
#include <stdio.h>
must be missing somewhere.
--
Regards,
Rask Ingemann Lambertsen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-12 14:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-05 23:18 [announce] scsi_id release 0.2 Patrick Mansfield
2003-12-07 15:38 ` Olaf Hering
2003-12-07 19:42 ` Patrick Mansfield
2003-12-07 19:59 ` Olaf Hering
2003-12-07 20:38 ` Patrick Mansfield
2003-12-12 14:27 ` Rask Ingemann Lambertsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox