[systemd-devel] [PATCH] Bootchart: allow parse LABEL, UUID, PARTUUID for svg info

Ivan Shapovalov intelfx100 at gmail.com
Mon Oct 27 17:45:35 PDT 2014


On Tuesday 28 October 2014 at 03:30:13, Timofey Titovets wrote:	
> Good time of day, list.
> I try to fix "Fixme" in svg.c:
> /* FIXME: this works only in the simple case */
> 
> By default function try to get root=/dev/*
> I write small function to determine block device name by specified 
> LABEL, UUID, PARTUUID.
> 
> Please check code, its working, but i think it can look more pretty.
> May be i missed(reimplemented) some internal functional of systemd?
> 
> [...]

Hi,

there is at least function fstab_node_to_udev_node() in shared/util.c
which converts "TAG=value" to "/dev/disk/by-tag/value",
and also function canonicalize_file_name() in glibc which resolves
symlinks and (hopefully) returns "/dev/sdXY".

I'm not the one to judge, but your code seems pretty messy, esp. with
extensive use of "magic" constants and numbers...

-- 
Ivan Shapovalov / intelfx /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141028/4c6921fa/attachment.sig>


More information about the systemd-devel mailing list