IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Request specific parents identified by subsystem and don't rely on
a predefined sequence.
Also let the devpath be longer than 72 chars, tsss ...
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
We never used any of the libsysfs convenience features. Here we replace
it completely with 300 lines of code, which are much simpler and a bit
faster cause udev(d) does not open any syfs file for a simple event which
does not need any parent device information.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
/tmp is not writable on most systems, so just use /dev to create a
temporary node. If called from a udev rule, "-d $tempnode" should be
used and udev will create a temporary node and pass the name before
calling scsi_id.
Also remove gen_scsi_id_udev_rules.sh per Patrick's request, as it's
no longer needed with the persistent disk links.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This patch is to enable the use of scsi_id to derive a UID for a SCSI-2
device which is not compliant with the page 83 inquiry reply format for
either SPC-2 or SPC-3. In this case, the page 83 reply does not
contain a list of Identification descriptors but a single binary encoded
hexa-decimal Vendor Specified Identifier.
The update is being driven by the need for scsi_id to support older
model EMC Symmetrix hardware, that is, models 4, 5, and 6.
Solaris uses volume_id now and they fiddled around with configure scripts
to map the linux kernel int types. Adding the types locally to volume_id
breaks the klibc build, so just switch to these ugly types and forget it. :)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Export the type of device from ata_id and scsi_id, also strip
leading and trailing whitespace and substitute consecutive
whitespace with a single underline char.
From: Hannes Reinecke <hare@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Update scsi_id to work with the libsysfs changes in udev: use
sysfs_get_classdev_attr and sysfs_get_device_attr in place of
sysfs_read_attribute_value.
Changes to scsi_id to support the udev %N and %p substitutions:
- Update version from .7 to .8
- change TMP_DIR back to /tmp
- if DEVPATH is set assume hotplug_mode (use syslog for logging, and does
not output some warnings)
- Always output a newline after the id is printed
- Allow command line options to override settings when hotplug_mode is set
- update man page
- update generator script to use the %N and %p substitutions.
Ananth released sysfsutils 0.4.0 last night, I'm sure you saw the email.
Here's a patch with the latest changes from the pre-patch I already
gave you. It includes sysfs_get_device_parent(), which you said you
needed. I've run your test scripts and I've built scsi_id. Please
play around with this and check it out.
There are quite a few changes. Please do not access
structure pointers, like sysfs_device's parent, directly like
dev->parent. Please use the "get" function to retrieve. The functions
load things on demand and refresh views under the covers.
Scsi_id hasn't been changed to use the latest libsysfs changes. The
"directory" in the sysfs_class_device is now considered "private" and only
should be accessed using functions. Treating the structures as handles lets
us only load information when it's needed, reducing caching or stale
information and also helping performance.
Here's the problem.
static inline char *sysfs_get_attr(struct sysfs_class_device *dev,
const char *attr)
{
return sysfs_get_value_from_attributes(dev->directory->attributes,
attr);
}
Please try this quick fix: