Module Name:    src
Committed By:   jdolecek
Date:           Sat Apr 11 17:21:16 UTC 2020

Modified Files:
        src/sbin/dkscan_bsdlabel: dkscan_bsdlabel.c

Log Message:
adjust to work with updated dkwedge_bsdlabel.c - provide geteblk() and
brelse() which just allocate/free the memory


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c
diff -u src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c:1.4 src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c:1.5
--- src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c:1.4	Thu Jun  8 22:24:29 2017
+++ src/sbin/dkscan_bsdlabel/dkscan_bsdlabel.c	Sat Apr 11 17:21:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dkscan_bsdlabel.c,v 1.4 2017/06/08 22:24:29 chs Exp $ */
+/* $NetBSD: dkscan_bsdlabel.c,v 1.5 2020/04/11 17:21:16 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
 #include <err.h>
 #include <util.h>
 #include <sys/disk.h>
+#include <sys/buf.h>
 
 #include "dkscan_util.h"
 
@@ -46,6 +47,22 @@ struct disk {
 	int		dk_blkshift;	/* shift to convert DEV_BSIZE to blks */
 };
 
+static struct buf *
+geteblk(int size)
+{
+	struct buf *bp = malloc(sizeof(*bp) + size);
+
+	bp->b_data = (void *)&bp[1];
+
+	return bp;
+}
+
+static void
+brelse(struct buf *bp, int set)
+{
+	free(bp);
+}
+
 #include "dkwedge_bsdlabel.c"
 
 __dead static void usage(void);

Reply via email to