mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
vmur: Remove option -c for dump file conversion
Remove option -c for implicit dump file conversion from vmdump format to lkcd format. If option -c is specified, an error message is printed and the program terminates. A hint to the new conversion tool zgetdump is shown. Option -c is not listed in the help text. The man page is also updated to reflect this change. With zgetdump tool now supporting vmdump file format there is no need to convert a vmdump file while extracting it from the reader device. Use commands 1. vmur rec <spool-id> VMDUMP_FILE 2. zgetdump VMDUMP_FILE ELF_FILE to extract a vmdump file from the reader and convert it to elf format. Note to Maintainer: The rename of file vmur.cpp to vmur.c triggers the pre-commit checking of git-format-clang. This checking fails. This is intended. The patch shows the changes for this line item. The pre-commit checking fails on many, many changes not touched for changed by this patch. The pre-commit failure should be fixed with a follow-on patch. Suggested-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Acked-by: Jan Hoeppner <hoeppner@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
067dd5c7ef
commit
d5f853c460
@@ -5,13 +5,12 @@ LDLIBS += -lz
|
|||||||
|
|
||||||
all: vmur
|
all: vmur
|
||||||
|
|
||||||
libs = $(rootdir)/libvmdump/libvmdump.a \
|
libs = $(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a
|
||||||
$(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a
|
|
||||||
|
|
||||||
objects = vmur.o
|
objects = vmur.o
|
||||||
|
|
||||||
vmur: $(objects) $(libs)
|
vmur: $(objects) $(libs)
|
||||||
$(LINKXX) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d -m 755 $(DESTDIR)$(USRSBINDIR) $(DESTDIR)$(MANDIR)/man8
|
$(INSTALL) -d -m 755 $(DESTDIR)$(USRSBINDIR) $(DESTDIR)$(MANDIR)/man8
|
||||||
|
|||||||
25
vmur/vmur.8
25
vmur/vmur.8
@@ -50,7 +50,7 @@ Position a file at the top of a spool file queue
|
|||||||
The \*v program requires the vmcp kernel module as prerequisite.
|
The \*v program requires the vmcp kernel module as prerequisite.
|
||||||
For the receive, punch, and print commands the vmur kernel module is also
|
For the receive, punch, and print commands the vmur kernel module is also
|
||||||
required, and the corresponding z/VM virtual unit record devices
|
required, and the corresponding z/VM virtual unit record devices
|
||||||
(in most cases 000c as reader, 000d as punch, and 000e as printer)
|
(in most cases 000c as reader, 000d as punch, and 000e as printer)
|
||||||
must be set online.
|
must be set online.
|
||||||
See
|
See
|
||||||
.BR chccwdev (8)
|
.BR chccwdev (8)
|
||||||
@@ -77,7 +77,7 @@ respective command context.
|
|||||||
.IP "" 0
|
.IP "" 0
|
||||||
Synopsis:
|
Synopsis:
|
||||||
.IP "" 2
|
.IP "" 2
|
||||||
receive [-fH] [-d dev_node] [-C class] [-t | -b sep.pad | -c]
|
receive [-fH] [-d dev_node] [-C class] [-t | -b sep.pad]
|
||||||
spoolid
|
spoolid
|
||||||
[-O | outfile]
|
[-O | outfile]
|
||||||
.PP
|
.PP
|
||||||
@@ -124,7 +124,7 @@ If omitted, /dev/vmrdr-0.0.000c is assumed.
|
|||||||
.IP "" 0
|
.IP "" 0
|
||||||
\fB-t or --text\fR
|
\fB-t or --text\fR
|
||||||
.IP "" 2
|
.IP "" 2
|
||||||
Specifies that a text file requiring EBCDIC-to-ASCII conversion is to be
|
Specifies that a text file requiring EBCDIC-to-ASCII conversion is to be
|
||||||
received. Character sets IBM037 and ISO-8859-1 are used for the conversion.
|
received. Character sets IBM037 and ISO-8859-1 are used for the conversion.
|
||||||
An ASCII line feed character (0x0a) is inserted for each 80-byte input
|
An ASCII line feed character (0x0a) is inserted for each 80-byte input
|
||||||
record read from the z/VM reader. Trailing EBCDIC blanks (0x40) in the
|
record read from the z/VM reader. Trailing EBCDIC blanks (0x40) in the
|
||||||
@@ -150,8 +150,14 @@ using the appropriate character sets, for example:
|
|||||||
.IP "" 0
|
.IP "" 0
|
||||||
\fB-c or --convert\fR
|
\fB-c or --convert\fR
|
||||||
.IP "" 2
|
.IP "" 2
|
||||||
Specifies to convert the VMDUMP spool file into a
|
Dump file conversion has been removed from
|
||||||
format appropriate for further analysis with crash or lcrash.
|
.BR vmur (8)
|
||||||
|
and -c is no longer a valid option.
|
||||||
|
An error message is displayed and the program terminates.
|
||||||
|
Use
|
||||||
|
.BR zgetdump (8)
|
||||||
|
to convert VMDUMP files to a format
|
||||||
|
appropriate for further analysis with crash.
|
||||||
.SP
|
.SP
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
\fB-O or --stdout\fR
|
\fB-O or --stdout\fR
|
||||||
@@ -299,7 +305,7 @@ residual of the record is filled up with the specified padding byte.
|
|||||||
If a line exceeds the record length, an error is printed.
|
If a line exceeds the record length, an error is printed.
|
||||||
.br
|
.br
|
||||||
.BR iconv (1)
|
.BR iconv (1)
|
||||||
output can be piped to punch or print, for example:
|
output can be piped to punch or print, for example:
|
||||||
.IP "" 2
|
.IP "" 2
|
||||||
# iconv xyz -f ISO-8859-1 -t EBCDIC-US | vmur pun -b 0x25,0x40 -N abc
|
# iconv xyz -f ISO-8859-1 -t EBCDIC-US | vmur pun -b 0x25,0x40 -N abc
|
||||||
.SP
|
.SP
|
||||||
@@ -403,7 +409,7 @@ The following command argument is supported by \fBlist\fR:
|
|||||||
\fBspoolid\fR
|
\fBspoolid\fR
|
||||||
.IP "" 2
|
.IP "" 2
|
||||||
Identifies the z/VM spool file to be listed.
|
Identifies the z/VM spool file to be listed.
|
||||||
If omitted, all spool files on the specified queue are listed
|
If omitted, all spool files on the specified queue are listed
|
||||||
.PD
|
.PD
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.SP
|
.SP
|
||||||
@@ -530,7 +536,7 @@ In the example below, the spool ID is 398:
|
|||||||
.in +0.25in
|
.in +0.25in
|
||||||
.nf
|
.nf
|
||||||
# vmcp sp cons clo \(rs* rdr
|
# vmcp sp cons clo \(rs* rdr
|
||||||
RDR FILE 0398 SENT FROM LINUX025 CON WAS 0398 RECS 1872
|
RDR FILE 0398 SENT FROM LINUX025 CON WAS 0398 RECS 1872
|
||||||
.fi
|
.fi
|
||||||
.in -0.25in
|
.in -0.25in
|
||||||
.ft
|
.ft
|
||||||
@@ -605,6 +611,7 @@ Prepare re-IPL from the z/VM reader and reboot:
|
|||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR chccwdev (8),
|
.BR chccwdev (8),
|
||||||
.BR vmcp (8),
|
.BR vmcp (8),
|
||||||
.BR iconv (1)
|
.BR iconv (1),
|
||||||
|
.BR zgetdump (8)
|
||||||
|
|
||||||
.I "Linux on System z - Device Drivers, Features, and Commands"
|
.I "Linux on System z - Device Drivers, Features, and Commands"
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ struct vmur {
|
|||||||
int force_specified;
|
int force_specified;
|
||||||
int stdout_specified;
|
int stdout_specified;
|
||||||
int hold_specified;
|
int hold_specified;
|
||||||
int convert_specified;
|
|
||||||
enum ur_action action;
|
enum ur_action action;
|
||||||
int devno;
|
int devno;
|
||||||
int ur_reclen;
|
int ur_reclen;
|
||||||
@@ -183,8 +182,6 @@ static char HELP_TEXT[] =
|
|||||||
"-t, --text Indicates text data causing EBCDIC to ASCII\n"
|
"-t, --text Indicates text data causing EBCDIC to ASCII\n"
|
||||||
" conversion.\n"
|
" conversion.\n"
|
||||||
"-b, --blocked Use blocked mode.\n"
|
"-b, --blocked Use blocked mode.\n"
|
||||||
"-c, --convert Specifies to convert VMDUMP file into a format\n"
|
|
||||||
" appropriate for further analysis with (l)crash.\n"
|
|
||||||
"-O, --stdout Write spool file to stdout.\n"
|
"-O, --stdout Write spool file to stdout.\n"
|
||||||
"-f, --force Overwrite files without prompt.\n"
|
"-f, --force Overwrite files without prompt.\n"
|
||||||
"-H, --hold Hold spool file in reader after receive.\n"
|
"-H, --hold Hold spool file in reader after receive.\n"
|
||||||
@@ -814,7 +811,10 @@ static void parse_opts_receive(struct vmur *info, int argc, char *argv[])
|
|||||||
++info->hold_specified;
|
++info->hold_specified;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
++info->convert_specified;
|
fprintf(stderr, "%s: Option '-c' is no longer valid. "
|
||||||
|
"Use zgetdump for dump file conversion.\n",
|
||||||
|
prog_name);
|
||||||
|
std_usage_exit();
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
set_spool_class(info, optarg, 1);
|
set_spool_class(info, optarg, 1);
|
||||||
@@ -834,14 +834,12 @@ static void parse_opts_receive(struct vmur *info, int argc, char *argv[])
|
|||||||
CHECK_SPEC_MAX(info->force_specified, 1, "force");
|
CHECK_SPEC_MAX(info->force_specified, 1, "force");
|
||||||
CHECK_SPEC_MAX(info->hold_specified, 1, "hold");
|
CHECK_SPEC_MAX(info->hold_specified, 1, "hold");
|
||||||
CHECK_SPEC_MAX(info->stdout_specified, 1, "stdout");
|
CHECK_SPEC_MAX(info->stdout_specified, 1, "stdout");
|
||||||
CHECK_SPEC_MAX(info->convert_specified, 1, "convert");
|
|
||||||
CHECK_SPEC_MAX(info->spool_class_specified, 1, "class");
|
CHECK_SPEC_MAX(info->spool_class_specified, 1, "class");
|
||||||
|
|
||||||
if (info->stdout_specified && info->file_name_specified)
|
if (info->stdout_specified && info->file_name_specified)
|
||||||
ERR_EXIT("File name not allowed, when --stdout specified!\n");
|
ERR_EXIT("File name not allowed, when --stdout specified!\n");
|
||||||
if (info->blocked_specified + info->text_specified +
|
if (info->blocked_specified + info->text_specified)
|
||||||
info->convert_specified > 1)
|
ERR_EXIT("Conflicting options: -b and -t are mutually "
|
||||||
ERR_EXIT("Conflicting options: -b, -t and -c are mutually "
|
|
||||||
"exclusive.\n");
|
"exclusive.\n");
|
||||||
if (!info->spool_class_specified)
|
if (!info->spool_class_specified)
|
||||||
set_spool_class(info, "*", 1);
|
set_spool_class(info, "*", 1);
|
||||||
@@ -1749,25 +1747,6 @@ static void ur_receive(struct vmur *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
type = get_spoolfile_fmt(info, &sfdata[0]);
|
type = get_spoolfile_fmt(info, &sfdata[0]);
|
||||||
if (info->convert_specified) {
|
|
||||||
if (type != TYPE_VMDUMP) {
|
|
||||||
ERR("Reader file %s does not have VMDUMP format, "
|
|
||||||
"conversion not possible.\n", info->spoolid);
|
|
||||||
goto fail;
|
|
||||||
} else {
|
|
||||||
close(fhi);
|
|
||||||
if (info->stdout_specified)
|
|
||||||
rc = vmdump_convert(info->devnode, NULL,
|
|
||||||
prog_name);
|
|
||||||
else
|
|
||||||
rc = vmdump_convert(info->devnode,
|
|
||||||
info->file_name, prog_name);
|
|
||||||
if (rc)
|
|
||||||
goto fail;
|
|
||||||
else
|
|
||||||
goto vm_convert_done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (type == TYPE_VMDUMP)
|
if (type == TYPE_VMDUMP)
|
||||||
ERR("INFO: Reader file %s has VMDUMP format.\n", info->spoolid);
|
ERR("INFO: Reader file %s has VMDUMP format.\n", info->spoolid);
|
||||||
if (type == TYPE_NETDATA)
|
if (type == TYPE_NETDATA)
|
||||||
@@ -1819,7 +1798,6 @@ static void ur_receive(struct vmur *info)
|
|||||||
if (fho != STDOUT_FILENO)
|
if (fho != STDOUT_FILENO)
|
||||||
close(fho);
|
close(fho);
|
||||||
close(fhi);
|
close(fhi);
|
||||||
vm_convert_done:
|
|
||||||
if (info->hold_specified)
|
if (info->hold_specified)
|
||||||
close_reader(info, "HOLD");
|
close_reader(info, "HOLD");
|
||||||
else
|
else
|
||||||
Reference in New Issue
Block a user