int sysfs_fd;
DIR *dir = NULL;
int rc = 1;
- char match[NAME_MAX] = "";
+ char match[NAME_MAX];
- udev = udev_new();
+ udev = udev_new();
if (udev == NULL)
goto exit;
}
/* lookup signature in sysfs to determine the name */
+ match[0] = '\0';
for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
- char file[PATH_SIZE];
+ char file[UTIL_PATH_SIZE];
char sysfs_id_buf[256];
uint32_t sysfs_id;
ssize_t size;
if (disk_id == sysfs_id) {
if (match[0] == '\0') {
/* store id */
- strlcpy(match, dent->d_name, sizeof(match));
+ util_strlcpy(match, dent->d_name, sizeof(match));
} else {
/* error, same signature for another device */
info(udev, "'%s' does not have a unique signature\n", node);