mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev: implement --shell command line switch
Fix issue in the lszdev command where column names if using the --pairs command line switch can contain characters that are not allowed to be used as variable names in a shell environment. Replace bad characters in column names by an underscore if the --shell command line switch is specified along with the --pairs switch. The additional --shell switch mimics what is already available in the lsblk command and thus it shall be used along with the --pairs switch. Signed-off-by: Daniel S. Haischt <modean@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
0c5b9f5d11
commit
889293e557
@@ -115,7 +115,7 @@ void print_type(struct devtype *dt, struct subtype *st, bool multiple)
|
||||
|
||||
/* Display table of attributes. */
|
||||
void table_attribs_show(struct util_list *attribs, int headings, int pairs,
|
||||
struct devtype *dt)
|
||||
int shell, struct devtype *dt)
|
||||
{
|
||||
struct util_list *subtypes, *subattribs;
|
||||
struct ptrlist_node *p;
|
||||
@@ -145,7 +145,7 @@ void table_attribs_show(struct util_list *attribs, int headings, int pairs,
|
||||
print_type(dt, st, multiple);
|
||||
|
||||
table_print(table_attribs, table_attribs_get_value, st,
|
||||
subattribs, NULL, headings, pairs, indent, 0);
|
||||
subattribs, NULL, headings, pairs, shell, indent, 0);
|
||||
|
||||
ptrlist_free(subattribs, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user