mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zfcpdump: Remove module load
The zfcpdump kernel is built without module support. Furthermore the initrd doesn't contain modprobe. So trying to load modules using modprobe in zfcpdump userspace doesn't really make sense. Signed-off-by: Philipp Rudo <prudo@linux.ibm.com> Reviewed-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
eb0dc13c88
commit
f02de298c1
@@ -359,41 +359,10 @@ void show_progress(unsigned long done)
|
||||
time_next = tv.tv_sec + 10;
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a kernel module
|
||||
*/
|
||||
static void modprobe(const char *module)
|
||||
{
|
||||
pid_t pid;
|
||||
|
||||
pid = fork();
|
||||
if (pid < 0) {
|
||||
PRINT_PERR("fork failed\n");
|
||||
return;
|
||||
} else if (pid == 0) {
|
||||
execl("/bin/modprobe", "modprobe", module, "-q", NULL);
|
||||
execl("/sbin/modprobe", "modprobe", module, "-q", NULL);
|
||||
exit(1);
|
||||
} else {
|
||||
waitpid(pid, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Load all required kernel modules
|
||||
*/
|
||||
static void load_modules(const char *module_list[])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; module_list[i]; i++)
|
||||
modprobe(module_list[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize zfcpdump
|
||||
*/
|
||||
int zfcpdump_init(const char *module_list[])
|
||||
int zfcpdump_init(void)
|
||||
{
|
||||
char start_time_str[128], linux_version[256];
|
||||
|
||||
@@ -436,7 +405,6 @@ int zfcpdump_init(const char *module_list[])
|
||||
PRINT_ERR("Could not parse parmline\n");
|
||||
return -1;
|
||||
}
|
||||
load_modules(module_list);
|
||||
if (enable_zfcp_device()) {
|
||||
PRINT_ERR("Could not enable dump device\n");
|
||||
return -1;
|
||||
|
||||
@@ -103,7 +103,7 @@ struct mem_chunk {
|
||||
*/
|
||||
void release_hsa(void);
|
||||
__u64 get_hsa_size(void);
|
||||
int zfcpdump_init(const char *module_list[]);
|
||||
int zfcpdump_init(void);
|
||||
void print_newline(void);
|
||||
void show_progress(unsigned long done);
|
||||
int terminate(int rc);
|
||||
|
||||
@@ -103,7 +103,6 @@ struct scsi_mbr {
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
static const char *module_list[] = {"zfcp", "sd_mod", "zcore_mod", NULL};
|
||||
static struct scsi_dump_sb dump_sb;
|
||||
static struct scsi_mbr mbr;
|
||||
|
||||
@@ -440,7 +439,7 @@ int main(int UNUSED(argc), char *UNUSED(argv[]))
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (zfcpdump_init(module_list))
|
||||
if (zfcpdump_init())
|
||||
return terminate(1);
|
||||
PRINT("Dump parameters:\n");
|
||||
PRINT(" devno....: %s\n", g.dump_devno);
|
||||
|
||||
Reference in New Issue
Block a user