[systemd-devel] [v2] udev: Expose new ISO9660 props from libblkid

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Feb 16 07:45:07 PST 2013


On Wed, Feb 13, 2013 at 05:39:54AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
> 
> This version 2 removes the bogus 'FS_' prefix from blkid property names.
> 
> ---
>  src/udev/udev-builtin-blkid.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c
> index 56a05f5..c42c19e 100644
> --- a/src/udev/udev-builtin-blkid.c
> +++ b/src/udev/udev-builtin-blkid.c
> @@ -78,7 +78,18 @@ static void print_property(struct udev_device *dev, bool test, const char *name,
>          } else if (startswith(name, "PART_ENTRY_")) {
>                  strscpyl(s, sizeof(s), "ID_", name, NULL);
>                  udev_builtin_add_property(dev, test, s, value);
> -        }
> +
> +        } else if (streq(name, "SYSTEM_ID"))
> +                udev_builtin_add_property(dev, test, "ID_FS_SYSTEM_ID", value);
> +
> +        else if (streq(name, "PUBLISHER_ID"))
> +                udev_builtin_add_property(dev, test, "ID_FS_PUBLISHER_ID", value);
> +
> +        else if (streq(name, "APPLICATION_ID"))
> +                udev_builtin_add_property(dev, test, "ID_FS_APPLICATION_ID", value);
> +
> +        else if (streq(name, "BOOT_SYSTEM_ID"))
> +                udev_builtin_add_property(dev, test, "ID_FS_BOOT_SYSTEM_ID", value);
Hi Zeeshan,
iiuc, those strings are under the control of the FS creator.
Shouldn't they be treated like e.g. LABEL and passed through
blkid_safe_string and blkid_encode_string?

Zbyszek


More information about the systemd-devel mailing list