diff options
author | Mark Mielke <mark.mielke@gmail.com> | 2018-08-13 23:54:34 -0400 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-08-21 14:13:40 +0000 |
commit | 9de3ccb5ffbc531a4d8ce708a733a861d3dcd3eb (patch) | |
tree | 88819ec90470f679f58e5ae9651384f82125516c /api/src/glfs-resolve.c | |
parent | b21b83af0baab3c651b6fd2e4657ca66080a7bcb (diff) |
Bash integration script should namespace variables
In the original submitted script, it looks like there was effort
put into namespacing all global variables. However a few mistakes
remained.
GLUSTER_TOP_SUBOPTIONSx were defined, but TOP_SUBOPTIONSx were
referenced. This was likely an unrecognized defect in the
original code submission? These are now corrected to refer to
GLUSTER_TOP_SUBOPTIONSx.
FINAL_LIST, LIST, and TOP were leaked into all Bash shells and
used by the command completion functions. The most problematic
of these was TOP, which was declared with "-i" making it an
integer. This cause other code which used TOP to define a path
to fail like this:
$ bash
$ TOP=/abc
bash: /abc: syntax error: operand expected (error token is "/abc")
These are now qualified as GLUSTER_FINAL_LIST, GLUSTER_LIST, and
GLUSTER_TOP to reduce impact on scripts that might choose to use
these extremely common variable names.
> Change-Id: Ic96eda8efd1f3238bbade6c6ddb69118e8d82158
> Signed-off-by: Mark Mielke <mark.mielke@gmail.com>
(cherry picked from commit 89545e745e4075845c18078be67a31dea93a4e88)
Change-Id: Ic96eda8efd1f3238bbade6c6ddb69118e8d82158
Fixes: bz#1425326
Signed-off-by: Mark Mielke <mark.mielke@gmail.com>
Diffstat (limited to 'api/src/glfs-resolve.c')
0 files changed, 0 insertions, 0 deletions