[PATCH] discover/udev.c: Added warning in system status log
Jeremy Kerr
jk at ozlabs.org
Mon Jul 12 13:08:48 AEST 2021
Hi Lulu,
[Looks like I made a mess of the previous reply; sending again with the
same content, this time with proper formatting]
> When the same iso files are installed at the same time,
> the petitboot menu will only display the installed device first,
> and will not notify the user that the same iso file has been installed,
> so an alert is added to the system status log to remind the user that
> they have mounted the same iso file.
What do you mean by 'iso file has been installed'?
Keep in mind that the system status log is not very obvious, so I'm not
sure if this will help the user much. This will also create a status
message on the main menu screen, but that may be replaced quickly if
another event occurs in quick sucession. Could you add a little detail
on what issue the user is seeing here?
> @@ -184,6 +185,11 @@ static int udev_handle_block_add(struct pb_udev *udev, struct udev_device *dev,
> + if (ddev) {
> + pb_log("SKIP: %s UUID [%s] already present (as %s)\n",
> + name, uuid, ddev->device->id);
> + if (strncmp(name, ddev->device->id, strlen(ddev->device->id))) {
When would this check ever fail? We'd have multiple block devices with
the same kernel name.
> + ddev = discover_device_create(udev->handler, NULL, name);
Why create the device here? We're about to skip discovery.
There are status logging functions that do not require a dev pointer.
> + device_handler_status_dev_info(udev-> handler, ddev,
> + _("The list doesn't support displaying the same mount file"));
This log message seems overly specific, and doesn't really describe the
situation (we're seeing a duplicate filesystem appear); we'd hit this
case on a few different situations, and the term 'mount file' doesn't
apply to all of those.
How about:
"%s: A duplicate filesystem has been detected (same as %s); only listing the first"
name, ddev->device->id
- would that work for your case?
Regards,
Jeremy
More information about the Petitboot
mailing list