Hello community, here is the log from the commit of package grub2 for openSUSE:Factory checked in at 2014-06-24 15:15:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grub2 (Old) and /work/SRC/openSUSE:Factory/.grub2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grub2" Changes: -------- --- /work/SRC/openSUSE:Factory/grub2/grub2.changes 2014-04-26 11:44:56.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.grub2.new/grub2.changes 2014-06-24 15:15:47.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Jun 20 19:50:28 UTC 2014 - je...@suse.com + +- grub2: use stat instead of udevadm for partition lookup (bnc#883635) + * Added grub2-use-stat-instead-of-udevadm-for-partition-lookup.patch + +------------------------------------------------------------------- New: ---- grub2-use-stat-instead-of-udevadm-for-partition-lookup.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub2.spec ++++++ --- /var/tmp/diff_new_pack.WU19A8/_old 2014-06-24 15:15:49.000000000 +0200 +++ /var/tmp/diff_new_pack.WU19A8/_new 2014-06-24 15:15:49.000000000 +0200 @@ -173,6 +173,7 @@ Patch224: grub2-ppc64-build-ppc64-32bit.patch Patch225: grub2-ppc64-qemu.patch Patch226: grub2-ppc64le-timeout.patch +Patch227: grub2-use-stat-instead-of-udevadm-for-partition-lookup.patch Requires: gettext-runtime %if 0%{?suse_version} >= 1140 @@ -362,6 +363,7 @@ %patch224 -p1 %patch225 -p1 %patch226 -p1 +%patch227 -p1 # Generate po/LINGUAS for message catalogs ... ./linguas.sh ++++++ grub2-use-stat-instead-of-udevadm-for-partition-lookup.patch ++++++ From: Jeff Mahoney <je...@suse.com> Subject: grub2: use stat instead of udevadm for partition lookup References: bnc#883635 sysfs_partition_path calls udevadm to resolve the sysfs path for a block device. That can be accomplished by stating the device node and using the major/minor to follow the symlinks in /sys/dev/block/. This cuts the execution time of grub2-mkconfig from 10s to 2s on my system. Signed-off-by: Jeff Mahoney <je...@suse.com> --- grub-core/osdep/linux/hostdisk.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/grub-core/osdep/linux/hostdisk.c +++ b/grub-core/osdep/linux/hostdisk.c @@ -105,6 +106,13 @@ sysfs_partition_path (const char *dev, c char *buf = NULL; size_t len = 0; char *path = NULL; + struct stat st; + int ret; + + ret = stat(dev, &st); + if (ret == 0 && S_ISBLK(st.st_mode)) + return xasprintf ("/sys/dev/block/%u:%u/%s", + major (st.st_rdev), minor (st.st_rdev), entry); argv[0] = "udevadm"; argv[1] = "info"; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org