From 77f4e608b7439c405d640783704cecd288b01d01 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 9 Jan 2008 20:35:40 +0000 Subject: Ignore any quotes around SUBCHANNELS and HWADDR, for admins that have accidentally added them (#351291) --- src/rename_device.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rename_device.c b/src/rename_device.c index 0ec08b46..36d8d32e 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -170,6 +170,19 @@ int isCfg(const struct dirent *dent) { return 1; } +static inline char *dequote(char *start, char *end) { + if (end==NULL) { + end=start; + while(*end) end++; + } + if (end > start) end--; + if ((*start == '\'' || *start == '\"') && ( *start == *end ) ) { + *end='\0'; + if (start