diff options
| author | Mark Newton <newton@FreeBSD.org> | 1999-02-04 21:20:13 +0000 |
|---|---|---|
| committer | Mark Newton <newton@FreeBSD.org> | 1999-02-04 21:20:13 +0000 |
| commit | d27583423ebfb0faed44b1f8f761d552c15acf37 (patch) | |
| tree | dff822f8186c966e4f8e93344654be155188a1aa /sys | |
| parent | c5145ee62daed85f9803ae847b68d4c9b98e3cff (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/alpha/linux/linux_sysvec.c | 14 | ||||
| -rw-r--r-- | sys/i386/linux/linux_sysvec.c | 14 |
2 files changed, 22 insertions, 6 deletions
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index fd80f1d438e86..744719cd5e30a 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_sysvec.c,v 1.43 1999/01/06 23:05:38 julian Exp $ + * $Id: linux_sysvec.c,v 1.44 1999/01/17 20:36:14 peter Exp $ */ /* XXX we use functions that might not exist. */ @@ -471,8 +471,16 @@ linux_elf_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; ++brandinfo) - if (elf_remove_brand_entry(*brandinfo) < 0) - error = EINVAL; + if (elf_brand_inuse(*brandinfo)) { + error = EBUSY; + } + + if (error == 0) { + for (brandinfo = &linux_brandlist[0]; + *brandinfo != NULL; ++brandinfo) + if (elf_remove_brand_entry(*brandinfo) < 0) + error = EINVAL; + } if (error) printf("Could not deinstall ELF interpreter entry\n"); else if (bootverbose) diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index fd80f1d438e86..744719cd5e30a 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_sysvec.c,v 1.43 1999/01/06 23:05:38 julian Exp $ + * $Id: linux_sysvec.c,v 1.44 1999/01/17 20:36:14 peter Exp $ */ /* XXX we use functions that might not exist. */ @@ -471,8 +471,16 @@ linux_elf_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; ++brandinfo) - if (elf_remove_brand_entry(*brandinfo) < 0) - error = EINVAL; + if (elf_brand_inuse(*brandinfo)) { + error = EBUSY; + } + + if (error == 0) { + for (brandinfo = &linux_brandlist[0]; + *brandinfo != NULL; ++brandinfo) + if (elf_remove_brand_entry(*brandinfo) < 0) + error = EINVAL; + } if (error) printf("Could not deinstall ELF interpreter entry\n"); else if (bootverbose) |
