From: Daniel Golle Date: Mon, 1 Nov 2021 16:17:45 +0000 (+0000) Subject: kernel: remove custom partition name patch X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b82a23e95938aaad6c42533c091b1f79e05f708f;p=openwrt%2Fstaging%2Fjow.git kernel: remove custom partition name patch Don't patch the kernel to expose the partition name in sysfs as it is already exposed via 'uevent'. All previous users have been converted to use 'uevent', so we can safely drop the custom patch. Signed-off-by: Daniel Golle --- diff --git a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch index c417c78eb6..41d4fd54fc 100644 --- a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch +++ b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch @@ -73,42 +73,7 @@ #ifdef CONFIG_SGI_PARTITION sgi_partition, #endif -@@ -215,6 +222,18 @@ static ssize_t part_discard_alignment_sh - p->start_sect)); - } - -+static ssize_t part_name_show(struct device *dev, -+ struct device_attribute *attr, char *buf) -+{ -+ struct hd_struct *p = dev_to_part(dev); -+ -+ if (p->info && p->info->volname) -+ return sprintf(buf, "%s\n", p->info->volname); -+ -+ buf[0] = '\0'; -+ return 0; -+} -+ - static DEVICE_ATTR(partition, 0444, part_partition_show, NULL); - static DEVICE_ATTR(start, 0444, part_start_show, NULL); - static DEVICE_ATTR(size, 0444, part_size_show, NULL); -@@ -223,6 +242,7 @@ static DEVICE_ATTR(alignment_offset, 044 - static DEVICE_ATTR(discard_alignment, 0444, part_discard_alignment_show, NULL); - static DEVICE_ATTR(stat, 0444, part_stat_show, NULL); - static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL); -+static DEVICE_ATTR(name, 0444, part_name_show, NULL); - #ifdef CONFIG_FAIL_MAKE_REQUEST - static struct device_attribute dev_attr_fail = - __ATTR(make-it-fail, 0644, part_fail_show, part_fail_store); -@@ -237,6 +257,7 @@ static struct attribute *part_attrs[] = - &dev_attr_discard_alignment.attr, - &dev_attr_stat.attr, - &dev_attr_inflight.attr, -+ &dev_attr_name.attr, - #ifdef CONFIG_FAIL_MAKE_REQUEST - &dev_attr_fail.attr, - #endif -@@ -694,6 +715,11 @@ static bool blk_add_partition(struct gen +@@ -694,6 +701,11 @@ static bool blk_add_partition(struct gen (state->parts[p].flags & ADDPART_FLAG_RAID)) md_autodetect_dev(part_to_dev(part)->devt);