From: Christos Zoulas Date: Sat, 20 Nov 2010 17:44:18 +0000 (-0500) Subject: Don't use haseq() to get the keyword to feed to hasmntopt(3), because X-Git-Tag: am-utils-6_2_rc1~2 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=4fc62d328635dfc367dbdc63841ccf26ede898a7;p=am-utils-6.2.git Don't use haseq() to get the keyword to feed to hasmntopt(3), because 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=" --- diff --git a/amd/am_ops.c b/amd/am_ops.c index d77b3c07..c1b0c5d9 100644 --- a/amd/am_ops.c +++ b/amd/am_ops.c @@ -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);