X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=plug%2Fudevtrigger.c;h=6bb34535aa2832aac4615bd3941aea2e8e2beae7;hp=5013189530a1741b8bfd8f3c9db85085124477f8;hb=7aad9409d22dc38b71ec75d2aafcfa32426b5594;hpb=916f95cb58604038695347ee41a430d8ca1f0556 diff --git a/plug/udevtrigger.c b/plug/udevtrigger.c index 5013189..6bb3453 100644 --- a/plug/udevtrigger.c +++ b/plug/udevtrigger.c @@ -66,7 +66,7 @@ static void log_message(int priority, const char *format, ...) log_message(LOG_INFO ,"%s: " format ,__FUNCTION__ ,## arg); \ } while (0) -#ifdef DEBUG +#ifdef UDEV_DEBUG #undef dbg #define dbg(format, arg...) \ do { \ @@ -114,7 +114,7 @@ static int sysfs_resolve_link(char *devpath, size_t size) strlcpy(link_path, "/sys", sizeof(link_path)); strlcat(link_path, devpath, sizeof(link_path)); - len = readlink(link_path, link_target, sizeof(link_target)); + len = readlink(link_path, link_target, sizeof(link_target) - 1); if (len <= 0) return -1; link_target[len] = '\0';