Don't use haseq() to get the keyword to feed to hasmntopt(3), because
authorChristos Zoulas <christos@zoulas.com>
Sat, 20 Nov 2010 17:44:18 +0000 (12:44 -0500)
committerChristos Zoulas <christos@zoulas.com>
Sat, 20 Nov 2010 17:44:18 +0000 (12:44 -0500)
haseq() will return the position after the "=" and while the internal
hasmntopt() that amd provides works with the extra equal, the regular
os ones, don't work. To do:
- remove haseq(); it is not used anywhere now.
- fix our hasmntopt() code to not accept "key="

amd/am_ops.c

index d77b3c073277812a238f0d789a8987b372f963b4..c1b0c5d9ff5bd92d039f00c3410e9b0235cd1254 100644 (file)
@@ -335,7 +335,7 @@ merge_opts(const char *opts1, const char *opts2)
     /* copy option to temp buffer */
     xstrlcpy(oneopt, tmpstr, sizeof(oneopt));
     /* if option has a value such as rsize=1024, chop the value part */
-    if ((eq = haseq(oneopt)))
+    if ((eq = strchr(oneopt, '=')))
       *eq = '\0';
     /* find reverse option of oneopt */
     revoneopt = reverse_option(oneopt);