Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 294106 | Differences between
and this patch

Collapse All | Expand All

(-)trunk/src/module.c (-2 / +3 lines)
Lines 123-135 Link Here
123
		goto om_bad;
123
		goto om_bad;
124
	}
124
	}
125
	/* Work out the path of the module to open */
125
	/* Work out the path of the module to open */
126
	module_path_len = strlen(type) + 1 + strlen(name) + strlen(MODULE_FILE_SUFFIX) + 1;
126
	/* Note that we need to open ./file, not just file! */
127
	module_path_len = 2 + strlen(type) + 1 + strlen(name) + strlen(MODULE_FILE_SUFFIX) + 1;
127
	module_path = malloc( module_path_len );
128
	module_path = malloc( module_path_len );
128
	if (module_path == NULL) {
129
	if (module_path == NULL) {
129
		error1( "Failed to allocate memory for module name: %s", strerror(errno) );
130
		error1( "Failed to allocate memory for module name: %s", strerror(errno) );
130
		goto om_bad;
131
		goto om_bad;
131
	}
132
	}
132
	snprintf( module_path, module_path_len, "%s_%s%s", type, name, MODULE_FILE_SUFFIX );
133
	snprintf( module_path, module_path_len, "./%s_%s%s", type, name, MODULE_FILE_SUFFIX );
133
	/* Display the path of the module created */
134
	/* Display the path of the module created */
134
	if(param.verbose > 1) fprintf(stderr, "Module path: %s\n", module_path );
135
	if(param.verbose > 1) fprintf(stderr, "Module path: %s\n", module_path );
135
136

Return to bug 294106