Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 16:24:02 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r237326 - user/ae/bootcode/sys/boot/i386/libi386
Message-ID:  <201206201624.q5KGO2Rs053221@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Wed Jun 20 16:24:02 2012
New Revision: 237326
URL: http://svn.freebsd.org/changeset/base/237326

Log:
  Add bd_cleanup function.

Modified:
  user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c

Modified: user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c	Wed Jun 20 16:21:08 2012	(r237325)
+++ user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c	Wed Jun 20 16:24:02 2012	(r237326)
@@ -193,6 +193,19 @@ bd_init(void)
 	return(0);
 }
 
+static void
+bd_cleanup(void)
+{
+	int i;
+
+	for (i = 0; i < nbdinfo; i++) {
+		if (bdinfo[i].bd_ptable != NULL) {
+			ptable_close(bdinfo[i].bd_ptable);
+			bdinfo[i].bd_ptable = NULL;
+		}
+	}
+}
+
 /*
  * Try to detect a device supported by the legacy int13 BIOS
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206201624.q5KGO2Rs053221>