diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-11-08 14:28:40 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2013-11-12 12:24:41 +0100 |
commit | 4632b2f3c067461ba7ab815affcca9ff7e3bf12c (patch) | |
tree | 0ef83e679046013e9396a6ad8877c0217aa6bcf1 /src/rename_device.c | |
parent | 3f42f2f0888808f6e631b962fd0c92275c701d1d (diff) | |
download | initscripts-4632b2f3c067461ba7ab815affcca9ff7e3bf12c.tar initscripts-4632b2f3c067461ba7ab815affcca9ff7e3bf12c.tar.gz initscripts-4632b2f3c067461ba7ab815affcca9ff7e3bf12c.tar.bz2 initscripts-4632b2f3c067461ba7ab815affcca9ff7e3bf12c.tar.xz initscripts-4632b2f3c067461ba7ab815affcca9ff7e3bf12c.zip |
rename_device: remove comments and trailing whitespaces
Diffstat (limited to 'src/rename_device.c')
-rw-r--r-- | src/rename_device.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rename_device.c b/src/rename_device.c index 8e28154d..bb5e6b8f 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -120,6 +120,14 @@ int isCfg(const struct dirent *dent) { } static inline char *dequote(char *start, char *end) { + char *c; + //remove comments and trailing whitespace + c = strchr(start, '#'); + if (c!=NULL) + *c='\0'; + + g_strchomp(start); + if (end==NULL) { end=start; while(*end) end++; |