Hello,

On 17.06.2013 at 18:18 Lennart Poettering <lenn...@poettering.net> wrote:

I think adding this certainly makes sense, but I am not sure I like the
syntax. Maybe it would be simpler to add an extra char for this ("a" or
so?). That way creating a dir and applying an xattr would require two
lines instead of one, but the stuff isn't atomic anyway.

Admittedly adding a new "a" isn't particularly nice either, but I have
no better idea than that...

I've looked into your way and found some problems. In parse_line(), after
creating, item is added to hashmap. Key is path, which already exists in
map. So adding "a" would require changing key (path + type?). Problem on
user side is that order matters - if user would add "a" entry first, than
setting attribute would fail, because file wouldn't exist yet.

Should I continue adding "a", look into Karols proposition or my original
patch is acceptable? Anybody having other ideas?

I've also found something which looks like a typo in lines 782 - 787:
             case RELABEL_PATH:

                    r = glob_item(i, item_set_perms);
                    if (r < 0)
                            return 0;
                    break;

Shouldn't it be "return r"? If it's not, then should I add comment, that
it's on purpose?

regards,
Maciej

--
Maciej Wereski
Samsung R&D Institute Poland
Samsung Electronics
m.were...@partner.samsung.com
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to