mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-04 17:47:03 +03:00
[PATCH] update udev scsi_id to scsi_id 0.3
This commit is contained in:
parent
eb7a964a7c
commit
e996d97835
@ -1,3 +1,36 @@
|
|||||||
|
2004-jan-15:
|
||||||
|
* Makefile: Version 0.3
|
||||||
|
|
||||||
|
2004-jan-13:
|
||||||
|
* scsi_id.c, Makefile: Fix prefix usage with scsi_id.config.
|
||||||
|
|
||||||
|
2004-jan-13:
|
||||||
|
* scsi_id.config: Clean up some comment entries.
|
||||||
|
|
||||||
|
2004-jan-13:
|
||||||
|
* Makefile: Install the sample scsi_id.config file.
|
||||||
|
|
||||||
|
2004-jan-13:
|
||||||
|
* Makefile: Use DESTDIR in all install/uninstall rules, per
|
||||||
|
problem reported by Svetoslav Slavtchev.
|
||||||
|
|
||||||
|
2004-jan-12:
|
||||||
|
* scsi_id.h, scsi_id.c, scsi_serial.c: Fix to work with current
|
||||||
|
sysfs 0.4, based on patch from Dan Stekloff, but uses
|
||||||
|
sysfs_read_attribute_value instead of
|
||||||
|
sysfs_get_value_from_attributes.
|
||||||
|
|
||||||
|
2004-jan-08:
|
||||||
|
* scsi_id.c: SYSFS_BUS_DIR was replaced with SYSFS_BUS_NAME.
|
||||||
|
|
||||||
|
2004-jan-08:
|
||||||
|
* scsi_id.c: Must now use sysfs_open_class_device_path instead of the
|
||||||
|
previous sysfs_open_class_device.
|
||||||
|
|
||||||
|
2003-dec-07:
|
||||||
|
* Makefile: patch from Olaf Hering <olh@suse.de> remove DEBUG and
|
||||||
|
add --fno-builtin
|
||||||
|
|
||||||
2003-dec-05:
|
2003-dec-05:
|
||||||
* Makefile, scsi_id.8: Add a man page.
|
* Makefile, scsi_id.8: Add a man page.
|
||||||
|
|
||||||
@ -53,12 +86,12 @@
|
|||||||
is no support for that in klibc.
|
is no support for that in klibc.
|
||||||
|
|
||||||
2003-nov-17:
|
2003-nov-17:
|
||||||
* scsi_id.c: Patch from Brian King: check result of setting model,
|
* scsi_id.c: Patch from Brian King <brking@us.ibm.com>: check
|
||||||
not vendor in per_dev_options.
|
result of setting model, not vendor in per_dev_options.
|
||||||
|
|
||||||
2003-nov-03:
|
2003-nov-03:
|
||||||
* scsi_id.c, scsi_serial.c: Use new and correct path to libsysfs.h.
|
* scsi_id.c, scsi_serial.c: Use new and correct path to libsysfs.h.
|
||||||
|
|
||||||
2003-nov-03:
|
2003-nov-03:
|
||||||
* scsi_id.h: Fix scsi_id.h so var args in marcros works ok with
|
* scsi_id.h: Fix scsi_id.h so var args in macros works ok with
|
||||||
older gcc.
|
older gcc.
|
||||||
|
@ -14,9 +14,10 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
SCSI_ID_VERSION=0.2
|
SCSI_ID_VERSION=0.3
|
||||||
|
|
||||||
prefix =
|
prefix =
|
||||||
|
etcdir = ${prefix}/etc
|
||||||
sbindir = ${prefix}/sbin
|
sbindir = ${prefix}/sbin
|
||||||
mandir = ${prefix}/usr/share/man
|
mandir = ${prefix}/usr/share/man
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ INSTALL_DATA = ${INSTALL} -m 644
|
|||||||
# Note some of the variables used here are set when built under udev, and
|
# Note some of the variables used here are set when built under udev, and
|
||||||
# otherwise might not be set.
|
# otherwise might not be set.
|
||||||
|
|
||||||
override CFLAGS+=-DSCSI_ID_VERSION=\"$(SCSI_ID_VERSION)\" $(DEBUG) -Wall
|
override CFLAGS+=-Wall -fno-builtin
|
||||||
|
|
||||||
PROG=scsi_id
|
PROG=scsi_id
|
||||||
SYSFS=-lsysfs
|
SYSFS=-lsysfs
|
||||||
@ -39,25 +40,35 @@ SYSFS=-lsysfs
|
|||||||
# LDFLAGS=$(STRIP)
|
# LDFLAGS=$(STRIP)
|
||||||
LD=$(CC)
|
LD=$(CC)
|
||||||
|
|
||||||
OBJS= scsi_id.o \
|
OBJS= scsi_id.o scsi_serial.o
|
||||||
scsi_serial.o \
|
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
|
|
||||||
# XXX use a compressed man page?
|
# XXX use a compressed man page?
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL_PROGRAM) -D $(PROG) $(sbindir)/$(PROG)
|
$(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
|
||||||
$(INSTALL_DATA) -D scsi_id.8 $(DESTDIR)$(mandir)/man8/scsi_id.8
|
$(INSTALL_DATA) -D scsi_id.8 $(DESTDIR)$(mandir)/man8/scsi_id.8
|
||||||
|
@if [ ! -r $(DESTDIR)$(etcdir)/scsi_id.config ]; then \
|
||||||
|
echo $(INSTALL_DATA) -D ./scsi_id.config $(DESTDIR)$(etcdir); \
|
||||||
|
$(INSTALL_DATA) -D ./scsi_id.config $(DESTDIR)$(etcdir)/scsi_id.config; \
|
||||||
|
fi
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
-rm $(sbindir)/$(PROG)
|
-rm $(DESTDIR)$(sbindir)/$(PROG)
|
||||||
-rm $(mandir)/man8/scsi_id.8
|
-rm $(DESTDIR)$(mandir)/man8/scsi_id.8
|
||||||
|
-rm $(DESTDIR)$(etcdir)/scsi_id.config
|
||||||
|
|
||||||
$(OBJS): scsi_id.h scsi.h
|
GEN_HEADER=scsi_id_version.h
|
||||||
|
|
||||||
|
scsi_id_version.h:
|
||||||
|
@echo "/* This file is auto-generated by the Makefile */" > $@
|
||||||
|
@echo \#define SCSI_ID_VERSION \"$(SCSI_ID_VERSION)\" >> $@
|
||||||
|
@echo \#define SCSI_ID_CONFIG_FILE \"$(etcdir)/scsi_id.config\" >> $@
|
||||||
|
$(OBJS): scsi_id.h scsi.h scsi_id_version.h
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(PROG) $(OBJS)
|
rm -f $(PROG) $(OBJS) $(GEN_HEADER)
|
||||||
|
|
||||||
$(PROG): $(OBJS)
|
$(PROG): $(OBJS)
|
||||||
$(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
|
$(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
|
||||||
|
@ -7,12 +7,7 @@ Requires:
|
|||||||
|
|
||||||
- Linux kernel 2.6
|
- Linux kernel 2.6
|
||||||
|
|
||||||
- libsysfs
|
- sysfsutils 0.4
|
||||||
|
|
||||||
No man page yet.
|
|
||||||
|
|
||||||
libsysfs 0_2_0 was not installing libsysfs.h or dlist.h, manually copy
|
|
||||||
those files to /usr/include/sys before compiling.
|
|
||||||
|
|
||||||
Build via make and make install.
|
Build via make and make install.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
- add information abou the config file to the man page
|
- add information about the config file to the man page
|
||||||
|
|
||||||
- change so non-KLIBC builds under udev don't use /usr/include/sysfs,
|
- change so non-KLIBC builds under udev don't use /usr/include/sysfs,
|
||||||
but instead use the sysfs included with udev (needs udev change and/or
|
but instead use the sysfs included with udev (needs udev change and/or
|
||||||
|
39
extras/scsi_id/release-notes
Normal file
39
extras/scsi_id/release-notes
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
Version 0.3 of scsi_id is available at:
|
||||||
|
|
||||||
|
http://www-124.ibm.com/storageio/scsi_id/scsi_id-0.3.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.
|
||||||
|
|
||||||
|
Version 0.3 requires:
|
||||||
|
|
||||||
|
- Linux kernel 2.6
|
||||||
|
- libsysfs 0.4.0
|
||||||
|
|
||||||
|
Major changes since the last release:
|
||||||
|
|
||||||
|
- Changes to work with libsysfs 0.4.0
|
||||||
|
|
||||||
|
All changes:
|
||||||
|
|
||||||
|
- fix "prefix" usage for path to scsi_id.config
|
||||||
|
|
||||||
|
- install the sample scsi_id.config file.
|
||||||
|
|
||||||
|
- Use DESTDIR in all install/uninstall rules, per problem reported
|
||||||
|
by Svetoslav Slavtchev.
|
||||||
|
|
||||||
|
- Fix to work with current sysfs 0.4, based on patch from Dan
|
||||||
|
Stekloff, but uses sysfs_read_attribute_value instead of
|
||||||
|
sysfs_get_value_from_attributes.
|
||||||
|
|
||||||
|
- SYSFS_BUS_DIR was replaced with SYSFS_BUS_NAME.
|
||||||
|
|
||||||
|
- Must now use sysfs_open_class_device_path instead of the
|
||||||
|
previous sysfs_open_class_device.
|
||||||
|
|
||||||
|
- patch from Olaf Hering <olh@suse.de> remove DEBUG and
|
||||||
|
add --fno-builtin
|
@ -40,6 +40,7 @@
|
|||||||
#else
|
#else
|
||||||
#include <sysfs/libsysfs.h>
|
#include <sysfs/libsysfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include "scsi_id_version.h"
|
||||||
#include "scsi_id.h"
|
#include "scsi_id.h"
|
||||||
|
|
||||||
#ifndef SCSI_ID_VERSION
|
#ifndef SCSI_ID_VERSION
|
||||||
@ -53,8 +54,6 @@
|
|||||||
#define TMP_DIR "/tmp"
|
#define TMP_DIR "/tmp"
|
||||||
#define TMP_PREFIX "scsi"
|
#define TMP_PREFIX "scsi"
|
||||||
|
|
||||||
#define CONFIG_FILE "/etc/scsi_id.config"
|
|
||||||
|
|
||||||
static const char short_options[] = "bc:d:ef:gip:s:vV";
|
static const char short_options[] = "bc:d:ef:gip:s:vV";
|
||||||
/*
|
/*
|
||||||
* Just duplicate per dev options.
|
* Just duplicate per dev options.
|
||||||
@ -67,7 +66,7 @@ static int all_good;
|
|||||||
static char *default_callout;
|
static char *default_callout;
|
||||||
static int dev_specified;
|
static int dev_specified;
|
||||||
static int sys_specified;
|
static int sys_specified;
|
||||||
static char config_file[MAX_NAME_LEN] = CONFIG_FILE;
|
static char config_file[MAX_NAME_LEN] = SCSI_ID_CONFIG_FILE;
|
||||||
static int display_bus_id;
|
static int display_bus_id;
|
||||||
static int default_page_code;
|
static int default_page_code;
|
||||||
static int use_stderr;
|
static int use_stderr;
|
||||||
@ -102,6 +101,18 @@ void log_message (int level, const char *format, ...)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sysfs_get_attr(const char *devpath, const char *attr, char *value,
|
||||||
|
size_t bufsize)
|
||||||
|
{
|
||||||
|
char attr_path[SYSFS_PATH_MAX];
|
||||||
|
|
||||||
|
strncpy(attr_path, devpath, SYSFS_PATH_MAX);
|
||||||
|
strncat(attr_path, "/", SYSFS_PATH_MAX);
|
||||||
|
strncat(attr_path, attr, SYSFS_PATH_MAX);
|
||||||
|
dprintf("%s\n", attr_path);
|
||||||
|
return sysfs_read_attribute_value(attr_path, value, SYSFS_NAME_LEN);
|
||||||
|
}
|
||||||
|
|
||||||
static int sysfs_get_actual_dev(const char *sysfs_path, char *dev, int len)
|
static int sysfs_get_actual_dev(const char *sysfs_path, char *dev, int len)
|
||||||
{
|
{
|
||||||
dprintf("%s\n", sysfs_path);
|
dprintf("%s\n", sysfs_path);
|
||||||
@ -153,34 +164,22 @@ static int sysfs_is_bus(const char *sysfs_path, const char *bus)
|
|||||||
|
|
||||||
static int get_major_minor(const char *devpath, int *major, int *minor)
|
static int get_major_minor(const char *devpath, int *major, int *minor)
|
||||||
{
|
{
|
||||||
struct sysfs_class_device *class_dev;
|
char dev_value[MAX_ATTR_LEN];
|
||||||
char dev_value[SYSFS_NAME_LEN];
|
|
||||||
char *dev;
|
|
||||||
|
|
||||||
dprintf("%s\n", devpath);
|
if (sysfs_get_attr(devpath, "dev", dev_value, MAX_ATTR_LEN)) {
|
||||||
class_dev = sysfs_open_class_device_path(devpath);
|
|
||||||
if (!class_dev) {
|
|
||||||
log_message(LOG_WARNING, "open class %s failed: %s\n", devpath,
|
|
||||||
strerror(errno));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev = sysfs_get_attr(class_dev, "dev");
|
|
||||||
if (dev)
|
|
||||||
strncpy(dev_value, dev, SYSFS_NAME_LEN);
|
|
||||||
sysfs_close_class_device(class_dev);
|
|
||||||
if (!dev) {
|
|
||||||
/*
|
/*
|
||||||
* XXX This happens a lot, since sg has no dev attr.
|
* XXX This happens a lot, since sg has no dev attr.
|
||||||
* Someday change this back to a LOG_WARNING.
|
* And now sysfsutils does not set a meaningful errno
|
||||||
|
* value. Someday change this back to a LOG_WARNING.
|
||||||
|
* And if sysfsutils changes, check for ENOENT and handle
|
||||||
|
* it separately.
|
||||||
*/
|
*/
|
||||||
log_message(LOG_DEBUG, "%s could not get dev attribute: %s\n",
|
log_message(LOG_DEBUG, "%s could not get dev attribute: %s\n",
|
||||||
devpath, strerror(errno));
|
devpath, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
dev = NULL;
|
|
||||||
|
|
||||||
dprintf("dev %s", dev_value); /* dev_value has a trailing \n */
|
dprintf("dev value %s", dev_value); /* dev_value has a trailing \n */
|
||||||
if (sscanf(dev_value, "%u:%u", major, minor) != 2) {
|
if (sscanf(dev_value, "%u:%u", major, minor) != 2) {
|
||||||
log_message(LOG_WARNING, "%s: invalid dev major/minor\n",
|
log_message(LOG_WARNING, "%s: invalid dev major/minor\n",
|
||||||
devpath);
|
devpath);
|
||||||
@ -547,8 +546,8 @@ static int per_dev_options(struct sysfs_class_device *scsi_dev, int *good_bad,
|
|||||||
int retval;
|
int retval;
|
||||||
int newargc;
|
int newargc;
|
||||||
char **newargv = NULL;
|
char **newargv = NULL;
|
||||||
char *vendor;
|
char vendor[MAX_ATTR_LEN];
|
||||||
char *model;
|
char model[MAX_ATTR_LEN];
|
||||||
int option;
|
int option;
|
||||||
|
|
||||||
*good_bad = all_good;
|
*good_bad = all_good;
|
||||||
@ -558,16 +557,14 @@ static int per_dev_options(struct sysfs_class_device *scsi_dev, int *good_bad,
|
|||||||
else
|
else
|
||||||
callout[0] = '\0';
|
callout[0] = '\0';
|
||||||
|
|
||||||
vendor = sysfs_get_attr(scsi_dev, "vendor");
|
if (sysfs_get_attr(scsi_dev->path, "vendor", vendor, MAX_ATTR_LEN)) {
|
||||||
if (!vendor) {
|
log_message(LOG_WARNING, "%s: cannot get vendor attribute\n",
|
||||||
log_message(LOG_WARNING, "%s: no vendor attribute\n",
|
|
||||||
scsi_dev->name);
|
scsi_dev->name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
model = sysfs_get_attr(scsi_dev, "model");
|
if (sysfs_get_attr(scsi_dev->path, "model", model, MAX_ATTR_LEN)) {
|
||||||
if (!model) {
|
log_message(LOG_WARNING, "%s: cannot get model attribute\n",
|
||||||
log_message(LOG_WARNING, "%s: no model attribute\n",
|
|
||||||
scsi_dev->name);
|
scsi_dev->name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
# vendor=string[,model=string],options=<per-device scsi_id options>
|
# vendor=string[,model=string],options=<per-device scsi_id options>
|
||||||
|
|
||||||
#
|
#
|
||||||
# If you normally don't need id's, black list everyone:
|
# If you normally don't need scsi id's, or might be attaching devices of
|
||||||
|
# an unknown functionality, black list everyone. This is the default
|
||||||
|
# behaviour (if no -b or -g is specified).
|
||||||
#
|
#
|
||||||
options=-b
|
options=-b
|
||||||
|
|
||||||
@ -30,7 +32,8 @@ options=-b
|
|||||||
#
|
#
|
||||||
vendor=someone, model=nicedrive, options=-g
|
vendor=someone, model=nicedrive, options=-g
|
||||||
|
|
||||||
# If you have all good devices on your system use, mark all as good:
|
# If you all the scsi devices are your system support valid id's, remove
|
||||||
|
# the -b line above, and mark all devices as good:
|
||||||
|
|
||||||
## options=-g
|
## options=-g
|
||||||
|
|
||||||
|
@ -27,6 +27,12 @@
|
|||||||
#define MAX_NAME_LEN 72
|
#define MAX_NAME_LEN 72
|
||||||
#define OFFSET (2 * sizeof(unsigned int))
|
#define OFFSET (2 * sizeof(unsigned int))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MAX_ATTR_LEN: maximum length of the result of reading a sysfs
|
||||||
|
* attribute.
|
||||||
|
*/
|
||||||
|
#define MAX_ATTR_LEN 256
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MAX_SERIAL_LEN: the maximum length of the serial number, including
|
* MAX_SERIAL_LEN: the maximum length of the serial number, including
|
||||||
* added prefixes such as vendor and product (model) strings.
|
* added prefixes such as vendor and product (model) strings.
|
||||||
@ -39,19 +45,8 @@
|
|||||||
*/
|
*/
|
||||||
#define MAX_BUFFER_LEN 256
|
#define MAX_BUFFER_LEN 256
|
||||||
|
|
||||||
static inline char *sysfs_get_attr(struct sysfs_class_device *dev,
|
extern int sysfs_get_attr(const char *devpath, const char *attr, char *value,
|
||||||
const char *attr)
|
size_t bufsize);
|
||||||
{
|
|
||||||
struct dlist *attributes = NULL;
|
|
||||||
|
|
||||||
attributes = sysfs_get_classdev_attributes(dev);
|
|
||||||
|
|
||||||
if (attributes == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return sysfs_get_value_from_attributes(attributes, attr);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern int scsi_get_serial (struct sysfs_class_device *scsi_dev,
|
extern int scsi_get_serial (struct sysfs_class_device *scsi_dev,
|
||||||
const char *devname, int page_code, char *serial,
|
const char *devname, int page_code, char *serial,
|
||||||
int len);
|
int len);
|
||||||
|
@ -385,7 +385,7 @@ static int do_scsi_page0_inquiry(struct sysfs_class_device *scsi_dev, int fd,
|
|||||||
char *buffer, int len)
|
char *buffer, int len)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
char *vendor;
|
char vendor[MAX_ATTR_LEN];
|
||||||
|
|
||||||
memset(buffer, 0, len);
|
memset(buffer, 0, len);
|
||||||
retval = scsi_inquiry(scsi_dev, fd, 1, 0x0, buffer, len);
|
retval = scsi_inquiry(scsi_dev, fd, 1, 0x0, buffer, len);
|
||||||
@ -415,9 +415,10 @@ static int do_scsi_page0_inquiry(struct sysfs_class_device *scsi_dev, int fd,
|
|||||||
* If the vendor id appears in the page assume the page is
|
* If the vendor id appears in the page assume the page is
|
||||||
* invalid.
|
* invalid.
|
||||||
*/
|
*/
|
||||||
vendor = sysfs_get_attr(scsi_dev, "vendor");
|
if (sysfs_get_attr(scsi_dev->path, "vendor", vendor,
|
||||||
if (!vendor) {
|
MAX_ATTR_LEN)) {
|
||||||
log_message(LOG_WARNING, "%s: no vendor attribute\n",
|
log_message(LOG_WARNING,
|
||||||
|
"%s: cannot get model attribute\n",
|
||||||
scsi_dev->name);
|
scsi_dev->name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -437,12 +438,11 @@ static int do_scsi_page0_inquiry(struct sysfs_class_device *scsi_dev, int fd,
|
|||||||
static int prepend_vendor_model(struct sysfs_class_device *scsi_dev,
|
static int prepend_vendor_model(struct sysfs_class_device *scsi_dev,
|
||||||
char *serial)
|
char *serial)
|
||||||
{
|
{
|
||||||
char *attr;
|
char attr[MAX_ATTR_LEN];
|
||||||
int ind;
|
int ind;
|
||||||
|
|
||||||
attr = sysfs_get_attr(scsi_dev, "vendor");
|
if (sysfs_get_attr(scsi_dev->path, "vendor", attr, MAX_ATTR_LEN)) {
|
||||||
if (!attr) {
|
log_message(LOG_WARNING, "%s: cannot get vendor attribute\n",
|
||||||
log_message(LOG_WARNING, "%s: no vendor attribute\n",
|
|
||||||
scsi_dev->name);
|
scsi_dev->name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -454,9 +454,8 @@ static int prepend_vendor_model(struct sysfs_class_device *scsi_dev,
|
|||||||
if (serial[ind] == '\n')
|
if (serial[ind] == '\n')
|
||||||
serial[ind] = '\0';
|
serial[ind] = '\0';
|
||||||
|
|
||||||
attr = sysfs_get_attr(scsi_dev, "model");
|
if (sysfs_get_attr(scsi_dev->path, "model", attr, MAX_ATTR_LEN)) {
|
||||||
if (!attr) {
|
log_message(LOG_WARNING, "%s: cannot get model attribute\n",
|
||||||
log_message(LOG_WARNING, "%s: no model attribute\n",
|
|
||||||
scsi_dev->name);
|
scsi_dev->name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user