* [PATCH 1/2] partition: include partuuid string in debug string
@ 2019-10-21 17:00 Ahmad Fatoum
2019-10-21 17:00 ` [PATCH 2/2] fs: devfs-core: do a case-insensitive compare of partuuids Ahmad Fatoum
2019-10-23 7:10 ` [PATCH 1/2] partition: include partuuid string in debug string Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-10-21 17:00 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
When debugging partitions detected by barebox, knowing the partuuid
can be useful. Include it in the dev_dbg output.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/partitions.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/partitions.c b/common/partitions.c
index 574b31fbbe9b..4162e86804db 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -54,8 +54,8 @@ static int register_one_partition(struct block_device *blk,
partition_name = basprintf("%s.%d", blk->cdev.name, no);
if (!partition_name)
return -ENOMEM;
- dev_dbg(blk->dev, "Registering partition %s on drive %s\n",
- partition_name, blk->cdev.name);
+ dev_dbg(blk->dev, "Registering partition %s on drive %s (partuuid=%s)\n",
+ partition_name, blk->cdev.name, part->partuuid);
cdev = devfs_add_partition(blk->cdev.name,
start, size, 0, partition_name);
if (IS_ERR(cdev)) {
--
2.23.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] fs: devfs-core: do a case-insensitive compare of partuuids
2019-10-21 17:00 [PATCH 1/2] partition: include partuuid string in debug string Ahmad Fatoum
@ 2019-10-21 17:00 ` Ahmad Fatoum
2019-10-23 7:10 ` [PATCH 1/2] partition: include partuuid string in debug string Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-10-21 17:00 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
partuuids are represented as hexadecimal strings, where case doesn't
matter. barebox formats them as lower case internally, forcing the
partuuid device tree property to be lower case too. Use strcasecmp to
be case-insensitive.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/devfs-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 2b93a951f269..e2cefb6d4e21 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -104,7 +104,7 @@ struct cdev *cdev_by_partuuid(const char *partuuid)
return NULL;
list_for_each_entry(cdev, &cdev_list, list) {
- if (!strcmp(cdev->partuuid, partuuid))
+ if (!strcasecmp(cdev->partuuid, partuuid))
return cdev;
}
return NULL;
--
2.23.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] partition: include partuuid string in debug string
2019-10-21 17:00 [PATCH 1/2] partition: include partuuid string in debug string Ahmad Fatoum
2019-10-21 17:00 ` [PATCH 2/2] fs: devfs-core: do a case-insensitive compare of partuuids Ahmad Fatoum
@ 2019-10-23 7:10 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2019-10-23 7:10 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Mon, Oct 21, 2019 at 07:00:43PM +0200, Ahmad Fatoum wrote:
> When debugging partitions detected by barebox, knowing the partuuid
> can be useful. Include it in the dev_dbg output.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/partitions.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-23 7:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21 17:00 [PATCH 1/2] partition: include partuuid string in debug string Ahmad Fatoum
2019-10-21 17:00 ` [PATCH 2/2] fs: devfs-core: do a case-insensitive compare of partuuids Ahmad Fatoum
2019-10-23 7:10 ` [PATCH 1/2] partition: include partuuid string in debug string Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox