/*
- * Copyright (C) 2008-2009 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2008-2009 Kay Sievers <kay@vrfy.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
struct udev_device *dev;
/* add sys dir if needed */
- if (strncmp(optarg, udev_get_sys_path(udev), strlen(udev_get_sys_path(udev))) != 0)
- util_strscpyl(path, sizeof(path), udev_get_sys_path(udev), optarg, NULL);
+ if (!startswith(optarg, "/sys"))
+ util_strscpyl(path, sizeof(path), "/sys", optarg, NULL);
else
util_strscpy(path, sizeof(path), optarg);
util_remove_trailing_chars(path, '/');