[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#4095: depmod doesn't create a proper modules.dep



Package: modules
Version: 2.0.0-7

Depmod fails to create the right side in the dependency file
modules.dep.  I suggest a modification to a previous applied
fix to Bug#3781 in 2.0.0-6:  Close the file *after* the last
usage. 

mfg
Rolf Rossius

--- modules_2.0.0/depmod/load_obj.c.2.0.0-7	Sat Aug 10 16:14:29 1996
+++ modules_2.0.0/depmod/load_obj.c	Sat Aug 10 16:14:35 1996
@@ -278,20 +278,20 @@
 	/* Make sure each file is closed */
 	/* Michael Meskes 7/29/96 <meskes@debian.org> */
 	if (feof(fp) || ferror(fp)) {
 		fclose(fp);
 		return 1;
 	}
 
-	fclose(fp);
 	if (N_MAGIC((*aouthdr)) == OMAGIC)
 		errstr = load_aout(fp, aouthdr, syms, mod);
 	else if ((header.e_ident[0] == 0x7f) &&
 		 (strncmp((const char *)&header.e_ident[1], "ELF",3) == 0) &&
 		 (header.e_type == ET_REL))
 		errstr = load_elf(fp, &header, syms, mod);
+	fclose(fp);
 #endif /* USE_BFD */
 	if (errstr != (char *)0)
 		return 1;
 	return 0;
 }
 #endif




Reply to: