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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Seems we find the md signature in cpu-order on the disk. Let's
look for both endian encodings ...
Thanks to Michael Prokop for his help finding the bug.
Bryan Kadzban wrote:
> Marco d'Itri wrote:
> > Bryan Kadzban wrote:
> >
> > > This is a sort of follow-up of my path-based persistence patch for
> > > net devices; it's the opposite type of addition for CD symlinks.
> >
> > Looks good. I am attaching a slightly reformatted version, I think it
> > should be applied.
>
> That's probably a lot more clear than my version anyway: what you posted
> looks like it does basically the same thing, just with some changes in
> the order and sense of checks.
This scheme is more consistent and makes it obvious if a match happens
against the event device only, or the full chain of parent devices.
The old key names are now:
BUS -> SUBSYSTEMS
ID -> KERNELS
SYSFS -> ATTRS
DRIVER -> DRIVERS
Match keys for the event device:
KERNEL
SUBSYSTEM
ATTR
DRIVER (in a future release, for now the same as DRIVERS)
Match keys for all devices along the parent device chain:
KERNELS
SUBSYSTEMS
ATTRS
DRIVERS
ID, BUS, SYSFS are no longer mentioned in the man page but still work.
DRIVER must be converted to DRIVERS to match the new scheme. For now,
an error is logged, if DRIVER is used. In a future release, the DRIVER
key behaviour will change.
As reported at http://bugs.gentoo.org/show_bug.cgi?id=113379
path_id is still broken for parisc boxes. This patch from
Jeroen Roovers <jer@gentoo.org> fixes that.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
As reported at http://bugs.gentoo.org/show_bug.cgi?id=113379 path_id
doesn't work too well for parisc boxes. This patch from Jeroen Roovers
<jer@gentoo.org> fixes that.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Packagers who still need this, should carry it in their own
package. It just causes too much trouble to users to have it
in the tree and expect that it's needed or the way to do it.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
FAT32 volumes should never have a cluster count, that fits
into a 16 bit value, but mkdosfs can create such volumes.
No sane formatter or Windows will ever do this, but the
Linux kernel as Windows can read/write it.
Thanks to Ted Ts'o <tytso@mit.edu> for convincing me.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
After beeing hit by proprietary applications which statically
link the LGPL'd libusb, which needs a patch to reflect the recent
kernel changes, I decided not to provide LGPL code anymore.
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>
The attached patch adds a check to edd_id.c to verify that the MBR
signature on the device node passed to the program is unique to only
that disk.
Signed-off-by: John Hull <john_hull@dell.com>
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.
vol_id segfaults if read() fails on broken devices reporting
the wrong size.
Thanks to Erhard Schultchen for the debugging.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
If USE_DEBUG=true and udev_log="debug", all output of the forked
programs to stdout and stderr is send to syslog.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
From: Bill Nottingham <notting@redhat.com>
Changed reading of firmware blob to mmap and let firmware_helper
follow the setting of the log level with UDEV_LOG.
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>
Some architectures really want well alingned structures.
Thanks to Jim Gifford <maillist@jg555.com> for help finding it.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Note, this assumes that you are putting your device nodes in /dev/, the
better thing to do is use the RUN= rule and not rely on this program at all.
Signed-off-by: Greg Kroah-Hartman <gregkh@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>
Any program can query with udevinfo for persistent device
attributes evaluated on device discovery now.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Handle all events with rules. If udev is expected to handle hotplug.d/
the exernal helper must be called.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Modern rules are expected to call notification and postprocessing with
the RUN key. For compatibility the current behavior can be emulated
with an external helper.
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.
udev can create the temporary node for us now. (On bootup we don't
know where a writable filesystem is mounted). Also the parent handling
is not needed anymore, cause udev is able to pass us the node name
of the parent device.
Adding prototypes for functions resulted in an error, cause:
table_find_disk(disk_snum, &chassis_num, &slot_num);
is called but the function is defined as:
int table_find_disk(char *serialnumber , int *host_num, int *chassis_num, int *slot_num)
which can obviously not work correctly.
Using popen() is not klibc compatible, so skip the compilation if
a klibc compile is requested.
The -d option in udev_allows to go from a partition to the underlying disk
for s390 dasd labels. If the device is already the disk itself, finding the
parent will fail, therefore -d on /sys/block/dasda/ for example gives no
result at all.
Fix FAT label reading bug for very large volumes.
Recognize FAT label at Win98 formatted volumes.
Read iso9660 joliet descriptor for unicode labels.
Support uuid/label of swap partitions.
Here is the first patch to cleanup the internal processing of the
various stages of an udev event. It should not change any behavior,
but if your system depends on udev, please always test it before reboot :)
We pass only one generic structure around between add, remove,
namedev, db and dev_d handling and make all relevant data available
to all internal stages. All udev structures are renamed to "udev".
We replace the fake parameter by a flag in the udev structure.
We open the class device in the main binaries and not in udev_add, to
make it possible to use libsysfs for udevstart directory crawling.
The last sleep parameters are removed.
Let's try it another way:
We define BLKGETSIZE64 in udev-volume_id.c now, cause including <fs.h>
does also not work with klibc. This hopefully fixes your compile problem
too.
Also included is an update to udev_volume_id with the latest fixes for
volume_id. It adds a simple logging file to map the debug function, that
we can use exactly the same files in HAL and udev.
Here is an update for the volume_id callout to catch up to the latest
and greatest:
o It is able to skip the label reading of linux raid members, which are
otherwise recognized as a normal filesystem.
o It reads FAT labels stored in the directory instead of the
superblock (Windows only writes in the directory).
o The NTFS uuid is the right one now.
o It reads all the Apple HFS(+) formats with the labels.
o UFS volumes are recognized but no labels are extracted.
o We use CFLAGS+=-D_FILE_OFFSET_BITS=64 instead of lsee64() which may fix
a bug mentioned on the klibc mailing list.
A lot of other new features are only used in HAL and not needed in this
simple callout. But if someone stumbles over it and want's to send a patch
for some exotic formats, we better keep it up to date :)
The attached patch contains a few patches against udev, to remove
use of various XSI:isms and bash:isms, and to change two scripts form
/bin/bash to /bin/sh. None of the bash-scripts in test/ uses any
bash-specific functions as far as I know, but I didn't touch them since
they aren't used runtime.
Rationale:
* Both of the /bin/bash-scripts are totally free from bashisms, hence they
don't need to be /bin/bash; using /bin/sh instead helps (mainly)
embedded-people
* local and source are bash:isms (well, they exist in several other
shells as well, but they aren't part of POSIX or any of its extensions)
* -a in tests is an XSI-extension, not part of strict POSIX, and is
easily replaced by &&
| http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
* Use of fgrep is deprecated in POSIX in favour of grep -F (though fgrep
will remain in use for a long time...)
| http://www.opengroup.org/onlinepubs/009695399/utilities/grep.html
The fgrep-change isn't really necessary, since fgrep can always be
implemented as a shell-script, but the rest of the changes would really
be appreciated.
First, update extras/start_udev. udevstart always internally set
UDEV_NO_SLEEP as well as setting the ACTION variable, so that only needs
to be done in the run_udev script case.
Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
volume_id is now able to read NTFS labels. Not very exciting, but we
keep up to date with the version in HAL. Also __packed__ was needed for
the structs, cause the gcc 3.4 compiled version was no longer working
properly.